A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
RabbitMQ in Depth
this week in the
Importing certificate into keystore.
Joined: Feb 12, 2003
Aug 02, 2007 10:43:00
I have a certificate that I want to import into the keystore using the
keytool command. Can this be done? It seems like the keytool command onlty allows you to create certificates or import CA certificates.
Joined: Sep 11, 2006
Aug 02, 2007 19:25:00
Yes, you surely can do that. To import a certificate, you can use this command:
keytool -import -file <file> -keystore <keystore.jks> -alias <whatever>
To import a CA cert, you normally do this:
keytool -import -trustcacerts -file <file> -keystore <keystore.jks> -alias <whatever>
To make a certificate chain, first you need to generate a key first.
keytool -genkey -keystore <keystore.jks> -alias <mykey>
then after your cert has been signed by the CA, you need to import it to make a certificate chain.
keytool -import -keystore <keystore.jks> -alias <mykey>
Remember, to make a certificate chain, you must import it with the same alias as the key that you generated.
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
I agree. Here's the link:
subject: Importing certificate into keystore.
Public keys in reply and keystore don't match
keytool - import CA reply certificate error
SOAP over HTTPS / SSL
Ora 10gAS: java.io.IOException: Keystore was tampered with, or password was incorrect
importing a certificate with keytool - effects of "trust this certificate"?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015