tomcat server 相关 数字证书 的生成

来源:互联网 发布:linux下web服务器配置 编辑:程序博客网 时间:2024/06/05 05:40


1. 生成PCCS12格式的keystore

keytool -v -genkey -alias tomcat -keyalg RSA -storetype PKCS12 -keystore tomcat.keystore -dname "CN=www.sap.com,OU=sap,O=SAP,L=SH,ST=SH,C=CN" -storepass Initial0 -keypass Initial0


2. 查看keystore的条目

openssl pkcs12 -info -in tomcat.keystore


keytool -list -v -storetype PKCS12 -keystore tomcat.keystore


3. 导出数字证书签发申请

keytool -certreq -alias tomcat -storetype PKCS12 -keystore tomcat.keystore -file tomcat.csr -v

或者直接拿到已经过CA签名的cer,http://www.cacert.org/certs/root.crt


4. 导入数字证书

获得签发后的数字证书后,需要将其导入信任库。

keytool -importcert -trustcacerts -alias tomcat -file tomcat.cer -keystore tomcat.keystore


原创粉丝点击