Linux:自签证书生成

来自WHY42
Riguz留言 | 贡献2021年10月29日 (五) 03:45的版本 (建立內容為「<syntaxhighlight lang="bash"> keytool\ -keystore server.jks -storepass thisisapassword -deststoretype pkcs12 \ -genkeypair -keyalg RSA -validity 395 -keysize…」的新頁面)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
keytool\
 -keystore server.jks  -storepass thisisapassword  -deststoretype pkcs12 \
 -genkeypair -keyalg RSA -validity 395 -keysize 2048  -sigalg SHA256withRSA \
 -dname "CN=registry.example.com,O=KingSoft,OU=BigData,L=Wuhan,ST=Hubei,C=CN" \
 -ext "SAN=IP:192.168.56.1,DNS:registry.example.com,EMAIL:admin@example.com"

openssl pkcs12 -in server.jks -nodes -nocerts -out cert.key
openssl pkcs12 -in server.jks -nokeys -out cert.crt