生成keystore文件:
keytool -genkey -alias tomcat -keyalg RSA -keystore H:/tomcat.keystore -validity 36500
从keystore的privatekeyEntry导出csr:
keytool -certreq -alias tomcat -sigalg MD5withRSA -file tomcat.csr -keystore server_keystore
转换crt为pem:
openssl x509 -inform DER -in yourdownloaded.crt -out outcert.pem -text
添加证书到信任证书文件:
openssl x509 -in <yourCA>.crt -text >> /usr/share/ssl/certs/ca-bundle.crt
生成CA私钥和自签名证书:
openssl req -new -x509 -extensions v3_ca -keyout private/cakey.pem -out cacert.pem -days 3650 -config ./openssl.conf
签名证书请求:
openssl x509 -req -in dev.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out dev.crt -days 365
导入证书到keystore:
keytool -import -alias caomiao_ca -keystore h:/tomcat.keystore -trustcacerts -file ca.crt
keytool -genkey -alias tomcat -keyalg RSA -keystore H:/tomcat.keystore -validity 36500
从keystore的privatekeyEntry导出csr:
keytool -certreq -alias tomcat -sigalg MD5withRSA -file tomcat.csr -keystore server_keystore
转换crt为pem:
openssl x509 -inform DER -in yourdownloaded.crt -out outcert.pem -text
添加证书到信任证书文件:
openssl x509 -in <yourCA>.crt -text >> /usr/share/ssl/certs/ca-bundle.crt
生成CA私钥和自签名证书:
openssl req -new -x509 -extensions v3_ca -keyout private/cakey.pem -out cacert.pem -days 3650 -config ./openssl.conf
签名证书请求:
openssl x509 -req -in dev.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out dev.crt -days 365
导入证书到keystore:
keytool -import -alias caomiao_ca -keystore h:/tomcat.keystore -trustcacerts -file ca.crt