Created
November 13, 2020 19:32
-
-
Save XMB5/43277a9ae4b21c84ee33f54516188b91 to your computer and use it in GitHub Desktop.
generates a self-signed secp256r1 tls key + certificate
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/bash | |
# generates a self-signed secp256r1 tls key + certificate | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "usage: $0 <key.pem> <cert.pem>" 2>& 1 | |
exit 1 | |
fi | |
openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -x509 -nodes -batch -days 36500 -out "$2" -keyout "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment