Last active
September 19, 2022 13:39
-
-
Save coder4web/2694ea9170d2e34160749765dbb5d065 to your computer and use it in GitHub Desktop.
Create a self-signed ECC 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/sh | |
# Private key | |
openssl ecparam -genkey -name secp384r1 -out nginx.ec.key | |
openssl ec -in nginx.ec.key -text -noout | |
# CSR | |
openssl req -new -sha256 -key nginx.ec.key -subj "/CN=devops/C=BM/ST=Bermudian/L=Bermudian/O=Org/OU=IT" -out nginx.ec.csr | |
#openssl req -in nginx.ec.csr -text -noout | |
openssl req -in nginx.ec.csr -text -noout | grep -i "Signature.*SHA256" && echo "All is well" | |
# Certificate | |
openssl req -x509 -sha256 -days 365 -key nginx.ec.key -in nginx.ec.csr -out nginx.ec.crt | |
# nginx conf | |
#ssl_certificate /etc/nginx/ssl/nginx.ec.crt; | |
#ssl_certificate_key /etc/nginx/ssl/nginx.ec.key; | |
openssl s_client -connect site.domain:443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment