SSL/TLS工具
OPENSSL
以下都是我自己常用的指令,詳細資訊可以將關鍵字餵Google大神
測試連線:
openssl s_client -showcerts -connect localhost:9092
產生證書及私鑰
openssl req -x509 -new -nodes -sha256 -utf8 -days 356 -newkey rsa:2048 -keyout server.key -out server.crt -config ssl.cnf
openssl req -x509 -new -nodes -sha256 -utf8 -days 3650 -newkey rsa:2048 -keyout server.key -out server.crt -config ssl.conf
產生PKCS12金鑰儲存庫
openssl pkcs12 -export -out server.p12 -inkey server.key -in server.crt// ssl.cnf
[req]
prompt = no
default_md = sha256
default_bits = 2048
distinguished_name = dn
x509_extensions = v3_req
[dn]
C = TW
ST = Taiwan
L = Taipei
O = Caster Inc.
OU = IT Department
emailAddress = admin@example.com
CN = localhost
[v3_req]
subjectAltName = @alt_names
[alt_names]
DNS.1 = *.localhost
DNS.2 = localhost
IP.1 = 127.0.0.1fKeytool
以下都是我自己常用的指令,詳細資訊可以將關鍵字餵Google大神
Create Self signed certificate 流程
init keystore
Create certificate
Bug 參考網址
JKS無法透過keytool放入私鑰
轉換 PKCS12 to PEM
Last updated