证书生成导入
keytool -genkey -alias ssozzjz5 -keyalg RSA -keysize 1024 -keypass 123456 -storepass 123456 -dname "CN=192.168.1.128,OU=csoa,O=csoa,L=FZ,ST=FZ,C=CN" -ext san=ip:192.168.1.128 -validity 3600 -keystore D:\ssozzjz5.keystore
keytool -export -file D:\ssozzjz5.crt -alias ssozzjz5 -keystore D:\ssozzjz5.keystore
进入到C:\Program Files\Java\jdk1.8.0_131\jre\lib\security目录下
keytool -import -keystore .\cacerts -file D:\ssozzjz5.crt -alias ssozzjz5
Tomcat配置修改
解除86行附近的注释,修改为如下:
<Connector port="8443" protocol="HTTP/1.1"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="D:\ssozzjz5.keystore" keystorePass="123456"/>
效果如下图所示: