diff options
-rw-r--r-- | openssl_ca.md | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/openssl_ca.md b/openssl_ca.md new file mode 100644 index 0000000..7cd92f9 --- /dev/null +++ b/openssl_ca.md @@ -0,0 +1,37 @@ +# OpenSSL with CA + +1. Generate private key for CA. +2. Generate CA certificate with CA private key. +3. Generate private key for the application. +4. Create certificate signing request (CSR) for the application. +5. Sign the CSR with the CA certificate and CA private key. + +## Generate private key for CA + +``` +openssl genrsa -out ca.key 4096 +``` + +## Generate CA certificate + +``` +openssl req -new -x509 -key ca.key -out ca.crt +``` + +## Generate app private key + +``` +openssl genrsa -out app.key 4096 +``` + +## Generate CSR + +``` +openssl req -new -key app.key -out app.csr +``` + +## Sign CSR + +``` +openssl x509 -req -in app.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out app.crt +``` |