Skip to content

Instantly share code, notes, and snippets.

@zyjibmcn
Last active September 21, 2016 03:37
Show Gist options
  • Save zyjibmcn/f4b75e0b07d138a69240e5cbc9f1f696 to your computer and use it in GitHub Desktop.
Save zyjibmcn/f4b75e0b07d138a69240e5cbc9f1f696 to your computer and use it in GitHub Desktop.
Create CA Signed SSL Certificates
Creating an SSL Certificate and Certificate Key
```
bash$ openssl req -x509 -new -out $HOST.crt -keyout $HOST.key -days 365
```
Creating an SSL Certificate Signing Request
```
bash$ openssl req -new -key $HOST.key -out $HOST.csr
```
Format the PEM Encoded Certificate
```
bash$ openssl pkcs7 -print_certs -in $HOST.pem -out $HOST.crt
```
Convert pem(pkcs7b) to pfx(pkcs12)
bash$ openssl pkcs12 -inkey $HOST.key -in $HOST.crt -export -out cert.pfx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment