Convert Key file and Cer file to keystore
8,323
Use the Java keytool to create a keystore and import the certificates needed there
keytool -importcert -file my_domain.cer -keystore mykeystore.jks
Related videos on Youtube
Author by
Võ Quang Hòa
Updated on September 18, 2022Comments
-
Võ Quang Hòa over 1 year
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 almost 8 yearsThanks 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 almost 8 yearsI hear that the error can be caused by giving a wrong alias search.thawte.com/support/ssl-digital-certificates/… but I don't know in this case, my boss has created the key file by the command from here vn.godaddy.com/help/…, no alias enterred.