Aws Ali Obeidat
Aws Ali Obeidat

Reputation: 25

Unable to load certificate chain to java keystore

I have a blah.p7b certificate type PKCS#7 which i want to import it to a java keystore using keytool in order to enable HTTPS on tomcat , i don't have the alias name and keystore when the certificate was generated i took it from the client whose want to enable https on our web-application server that they use, can this works without having the original alias name and keystore ? when i tried to import the certificate i used this command

keytool -import -trustcacerts -file certificate.p7b -keystore keystore -storepass <mypasswd> -alias "myalias"

but it gives me this error

keytool error: java.lang.Exception: Certificate reply does not contain public key for <mydomain>

Please help...

Upvotes: 1

Views: 2394

Answers (1)

user207421
user207421

Reputation: 310840

If you haven't got the original KeyStore you are hosed. You have to generate a new KeyStore, a new keypair, a new CSR, get it signed, and then import the signed cert and its chain into the KeyStore using the same alias as the keypair.

Upvotes: 1

Related Questions