i want to add alfresco certificate(browser.p12) into my keystore( /usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/security/cacerts) for that i am converting my browser.p12 file into browser.pem file and try to add into my keystore but its telling Input not an X.509 certificate. i just search so i found that my alias name is not correct so just looking alias i run this command keytool -list -keystore browser.p12
so its giving exception Invalid keystore format so can anyone tell me how to find the alias of alfresco default certificate or if anyone knows the alias name then please tell me.
Asked
Active
Viewed 285 times
0

Sachin Singh
- 99
- 12
-
As per [the Alfresco keystore docs](http://docs.alfresco.com/4.0/tasks/generate-repo-ssl-keystore.html), what happens if you add the option `-storetype JCEKS` when querying the current keystore? – Gagravarr Aug 04 '16 at 14:15
-
when i am using this '**keytool -list -v -storetype JCEKS -keystore browser.p12'** then again its giving same exception as you can see below **keytool error: java.io.IOException: Invalid keystore format java.io.IOException: Invalid keystore format at com.sun.crypto.provider.JceKeyStore.engineLoad(JceKeyStore.java:709) at java.security.KeyStore.load(KeyStore.java:1226) at sun.security.tools.KeyTool.doCommands(KeyTool.java:789) at sun.security.tools.KeyTool.run(KeyTool.java:340) at sun.security.tools.KeyTool.main(KeyTool.java:333)** – Sachin Singh Aug 05 '16 at 04:20
-
JCEKS is what the main keystore should be in. P12 = PKCS12 = something completely different! The docs I linked to does also give tips on importing from PKSC12 – Gagravarr Aug 05 '16 at 09:53
-
thanks Mr. Gagravarr i will also check the document that you suggested but the answer that i posted is working fine for me. – Sachin Singh Aug 05 '16 at 10:53
1 Answers
0
I got the answer after a small struggle i was passing wrong store type the correct store type is given below -storetype PKCS12 and the alias name of the certificate is ssl.repo

Sachin Singh
- 99
- 12