Created
March 17, 2021 21:19
-
-
Save bobbae/47cebdbd7cb3606cfe90486e911a6080 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
| #!/bin/sh | |
| # Generate self signed root CA cert | |
| openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=VIC/L=Melbourne/O=Ranch/OU=root/CN=root/[email protected]" | |
| # Generate server cert to be signed | |
| openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=VIC/L=Melbourne/O=Ranch/OU=root/CN=localhost/[email protected]" | |
| # Sign the server cert | |
| openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment