命令
keytool -genkey -v -alias dmLi -keyalg RSA -keystore /Users/promiss/Public/keystore/dmHui.keystore -validity 36500
过程如下
➜ keytool -genkey -v -alias dmLi -keyalg RSA -keystore /Users/promiss/Public/keystore/dmHui.keystore -validity 36500
Enter keystore password: 密码
Re-enter new password: 密码
What is your first and last name?
[Unknown]: localhost
What is the name of your organizational unit?
[Unknown]: localhost
What is the name of your organization?
[Unknown]: localhost
What is the name of your City or Locality?
[Unknown]: Jiangsu
What is the name of your State or Province?
[Unknown]: Jiangsu
What is the two-letter country code for this unit?
[Unknown]: cn
Is CN=localhost, OU=localhost, O=localhost, L=Jiangsu, ST=Jiangsu, C=cn correct?
[no]: y
配置
conf/server.xml
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true"
scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="/Users/promiss/Public/keystore/dmHui.keystore"
keystorePass="DLMA37629405">
</Connector>