How to import a .cer certificate into a java keystore?

后端 未结 8 920
有刺的猬
有刺的猬 2020-11-22 15:38

During the development of a Java webservice client I ran into a problem. Authentication for the webservice is using a client certificate, a username and a password. The clie

8条回答
  •  攒了一身酷
    2020-11-22 16:33

    Here's how this worked for me:

    1. Save as .txt the certificate data in the following format in a text editor

      -----BEGIN CERTIFICATE----- [data serialized by microsoft] -----END CERTIFICATE-----

    2. Open chrome browser (this step might work with other browsers too) settings > show advanced settings > HTTPS/SSL > manage certificates Import the .txt in step 1
    3. Select and export that certificate in Base-64 encoded format. Save it as .cer
    4. Now you can use keytool or Portecle to import it to your java keystore

提交回复
热议问题