The difference between turning/keystore and Truststore

Source: Internet
Author: User

Keytool is a Java-brought tool for generating keys

KeyStore can be seen as a library of key, key is a public key, private key, digital signature and other components of a message.

Truststore is a store that puts a trusted certificate.

What do they have to do with the relationship? What role do they play in a secure link model?

Well, I'm not really sure,-_-b.

I'll write down the current understanding, and then revise it slowly.

This article is mainly for Web applications, Web applications are generally through the HTTPS,SSL to do the client and server side of the link

As an example of one-way verification, the server-side app server is tomcat

The most common (and I feel Simple) security scheme is one-way verification, which means that client IE verifies the identity of the server. This requires some configuration on the server side.

1. In the command line, generate a key in KeyStore by using Keytool.

There are two concepts here, KeyStore and key.

Key, which holds the digital certificate (including the public key and the publisher's digital signature), and the private key

KeyStore, can be considered as a repository of key, in the form of files in the system, the default is placed under C:\Documents and settings\user...\, you can also specify the path and file name on the command line

2. Export key as a digital certificate from KeyStore, digital certificate (including public key and publisher's digital signature)

3. Import the digital certificate into Truststore, typically the Jre\lib\security\cacerts file under Java_home used by Tomcat

In fact, the nature of Truststore and KeyStore is the same, is a repository of key storage, the difference is that the truststore is stored only a public key digital certificate, representing the certificate can be trusted, and KeyStore is the private key. But the specific application still needs to be researched deeply, here I am not very clear

4. Configure the appropriate SSL port in the Server.xml under Tomcat so that the client can access the server via HTTPS

The difference between turning/keystore and Truststore

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.