Last active
August 22, 2018 14:20
-
-
Save NullArray/de1406d4e18790a861574f7cffdbc3d4 to your computer and use it in GitHub Desktop.
Small shell script to generate OpenSSL cert.
This file contains 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 | |
openssl genrsa -aes256 -out priv.pem 2048 | |
cat priv.pem | |
openssl rsa -text -in priv.pem | |
openssl rsa -in priv.pem -pubout -out pub.pem | |
openssl req -new -key priv.pem -out cert.csr | |
openssl req -text -in cert.csr -noout | |
# Set to be renewed after a year. | |
openssl x509 -req -days 365 -in cert.csr -signkey priv.pem -out cert.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment