This generates the certificate using the Java Keytool tool:
1, CD into the Java/bin directory
Run command Keytool to view Help
Keytool-genkey-alias Demo-keyalg Rsa-keystore Demo.jks
-alias
followed by a unique alias, followed by the -keystore
file path to save the key pair
123456 -keystore demo.jks-file demo.cer
Here is the export certificate for use by the client.
The next step is to configure the certificate on the Tomcat server.
Attach the configuration in Tomcat, in the Conf/server.xml under Tomcat:
<ConnectorPort= "8443"Protocol= "Org.apache.coyote.http11.Http11NioProtocol"MaxThreads= "Max"sslenabled= "true"Scheme= "https"Secure= "true"ClientAuth= "false"Sslprotocol= "TLS"Keystorefile= ". JKs File Path"Keystorepass= "Password" />
I use ofbiz here, so it is configured in Framework/base/config/ofbiz-containers.xml
< Propertyname= "Keystorefile"value= "Framework/base/config/demo.jks"/> < Propertyname= "Keystorepass"value= "123456"/> < Propertyname= "Keystoretype"value= "JKS"/> < Propertyname= "Sslprotocol"value= "TLS"/>
About the build of the JDK certificate Http://www.cnblogs.com/youxia/p/java002.html#_label2 the blog is very clear.
OFBiz HTTPS Certificate