Created
May 26, 2023 11:07
-
-
Save whiler/3a5b763598ce15595bf343a13243ce5d to your computer and use it in GitHub Desktop.
一行命令生成自签名的 ECC TLS 证书
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/bash | |
openssl req \ | |
-new \ | |
-newkey ec \ | |
-pkeyopt ec_paramgen_curve:secp384r1 \ | |
-sha256 \ | |
-days 92 \ | |
-nodes \ | |
-x509 \ | |
-subj "/CN=localhost" \ | |
-addext "subjectAltName=DNS:*.localhost,IP:127.0.0.1" \ | |
-keyout server.key.pem \ | |
-out server.cert.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment