-
得到keystore file和truststore file
證書owner列舉
Owner: CN=sso.yyasc.com.cn, OU=The ASC of YYII, O=YueYuen Industrial Ltd.co, L=dongguan, ST=guangdong, C=CN
產生keystore 文件 tomcat
D:\>keytool -genkey -alias tomcat -keyalg RSA -keystore d:/tomcat -keysize 1024
-validity 3560 -storepass ascsslkey0901
以keystore file 產生證書 tomcat.cer
keytool -export -trustcacerts -alias tomcat -file tomcat.cer -keystore tomcat -storepass ascsslkey0901
將tomcat.cer 導入到證書信任庫中 (信任庫文件cacerts,沒有即產生新的)
keytool -import -trustcacerts -alias tomcat -file tomcat.cer -keystore cacerts -storepass ascsslkey0901
這樣就得到了keystore file: tomcat 和truststore file : cacerts
2. Tomcat的/conf/server.xml設置
<Connector port="443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="conf\tomcat" keystorePass="xxxxxxxxxxxxxx"
truststoreFile="conf\cacerts" truststorePass="xxxxxxxxxxxxxx"/>