Trust Store vs Key Store - creating with keytool

前端 未结 7 711
粉色の甜心
粉色の甜心 2020-11-22 05:27

I understand that the keystore would usually hold private/public keys and the trust store only public keys (and represents the list of trusted parties you intend to communic

7条回答
  •  萌比男神i
    2020-11-22 05:51

    These are the steps to create a Truststore in your local machine using Keytool. Steps to create truststore for a URL in your local machine.

    1) Hit the url in the browser using chrome

    2) Check for the "i" icon to the left of the url in the chrome and click it

    3) Check for certificate option and click it and a Dialog box will open

    4) check the "certificate path" tab for the number of certificates available to create the truststore

    5) Go the "details" tab -> click"Copy to File" -> Give the path and the name for the certificate you want to create.

    6) Check if it has parent certificates and follow the point "5".

    7) After all the certificates are being create open Command Prompt and navigate to the path where you created the certificates.

    8) provide the below Keytool command to add the certificates and create a truststore.

    Sample: 
       keytool -import -alias abcdefg -file abcdefg.cer -keystore cacerts
            where "abcdefg" is the alias name and "abcdefg.cer" is the actual certificate name and "cacerts" is the truststore name
    

    9) Provide the keytool command for all the certificates and add them to the trust store.

        keytool -list -v -keystore cacerts
    

提交回复
热议问题