0

My boss has used Openssl to buy a certificate and now I have this files:

  • a key file, (yourdomain.key),
  • a csr file (yourdomain.csr),
  • a cer file (my_domain.cer) (IIS SSL Certificate (PKCS#7) received from comodo.com)

The file .cer has format

-----BEGIN PKCS7-----

.......

-----END PKCS7-----

In order to config my SSL certificate on my tomcat, I want to regenerate a keystore file. I google it but no answer could help me. Can anyone help me to do that ?

Võ Quang Hòa
  • 101
  • 1
  • 1

1 Answers1

1

Use the Java keytool to create a keystore and import the certificates needed there

keytool -importcert -file my_domain.cer -keystore mykeystore.jks
DoNuT
  • 111
  • 3
  • 1
    Thanks for your answer, but i got this error keytool error: java.lang.Exception: Input not an X.509 certificate. Could you give me some idea to fix ? The cer is the file I receive from comondo.com and has the format as I mention above. – Võ Quang Hòa Jul 06 '16 at 13:27
  • I hear that the error can be caused by giving a wrong alias https://search.thawte.com/support/ssl-digital-certificates/index?page=content&id=SO1781 but I don't know in this case, my boss has created the key file by the command from here https://vn.godaddy.com/help/apache-generate-csr-certificate-signing-request-5269, no alias enterred. – Võ Quang Hòa Jul 06 '16 at 13:37