1. Create a certificate keystore
The process of creating a certificate keystore.
Procedure
Use the built-in JDK command keytool to create the "keystore" file, which contains the key. In the command line window, enter the following command: keytool-genkey-alias TBB-keyalg RSA-keystore D: \ TBB. keystore
Enter the "keystore" password as prompted, for example, "password ".
Enter other data as prompted.
After the input is complete, the system will ask the user if the entered information is correct. If yes, enter "Y"; otherwise, enter "N ".
Note: Enter the local IP address.
Enter the password of the private key, for example, "password ".
Enter the password of the private key.
The system will generate a "keystore" file in the current path.
Ii. Create a self-signed certificate
The process of creating a self-signed certificate.
Procedure
Use the built-in JDK command keytool to create a self-signed certificate.
Keytool-selfcert-alias TBB-keystore D: \ TBB. keystore
Enter the password you entered when creating the keystore.
Verify the keystore.
Keytool-selfcert-alias TBB-keystore D: \ TBB. keystore
After the verification is successful, export the certificate.
Keytool-export-alias TBB-keystore D: \ TBB. keystore-storepass 123456-RFC-file D: \ TBB. Cer
The system will export a CER file in the current directory based on the previous keystore file.
3. Import the certificate to a trusted root certificate authority
4. Configure Tomcat server. XML (tomcat7.0)
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystorePass="yourpasswd" keystoreFile="your keystore" />
Configuration successful