How to configure HTTPS two-way authentication with Tomcat server

Source: Internet
Author: User
Tags pkcs12 tomcat tomcat server

First, please ensure that the JDK is installed, and that the environment variables and configurations are well configured

First step, generate a certificate for the server:

Use Toolkey to generate certificates for Tomcat, assuming the domain name of the target machine is localhost, using the following command to generate:keytool–genkey–v–aliaslocalhost_server Rsa–keystore Localhost_server.store–validity 36500

Step two, generate a certificate for the client:

Generate a certificate for the browser so that the server can verify it. In order to ensure that the certificate is successfully imported into IE and Firefox, the certificate format should be PKCS12, so use the following command to generate:keytool–genkey–v–aliaslocalhost_client–keyalg rsa– Storetype Pkcs12–keystore localhost_client.p12. This produces the Localhost_client.p12 file, we simply double-click the Localhost_client.p12 file to import the certificate into the browser (client).

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.