Use the built-in JDK tool keytool to generate a trusted Certificate

Source: Internet
Author: User

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

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.