Created
July 28, 2014 17:49
-
-
Save brnrc/cd9ff760e9ac9727e03b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Creating a Certification Authority (CA) | |
| openssl genrsa -aes256 -out <key file name>.key <key size> | |
| # Creating the request (example of a DN "/O=Me/OU=MyOrganizationalUnit/CN=My CA Common Name") | |
| openssl req -new -extensions v3_req -key <key pair file>.key -out <csr file>.csr -days <csr validity> -config ca.conf -subj <certificate subject DN> | |
| # self-sign | |
| openssl x509 -req -in <csr file>.csr -out <cert file>.crt -extensions ca_cert_exts -days 3650 -extfile ca.conf -signkey <key pair file>.key -CAcreateserial | |
| # Embed private keys with the certificate.cer to create a PKCS #12 (.pfx) file | |
| openssl pkcs12 -export -out certificate.pfx -inkey <key file name>.key -in <certificate file name>.crt -certfile <CA certificate>.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment