[lug] Migrating x509 public/private keypair to java jks

Hugh Brown hugh at math.byu.edu
Mon Apr 10 17:45:37 MDT 2006


On Mon, 2006-04-10 at 17:12 -0600, Andrew Diederich wrote:
> On 4/10/06, Garett Shulman <shulmang at colorado.edu> wrote:
> 
> > It should be possible to import cert.pem into a keystore. I usually use
> > do something like:
> > keytool -import -trustcacerts -keystore
> > $JAVA_HOME/jre/lib/security/cacerts -alias mycert -file path_to/cert.pem
> >
> > What does the cert look like if you open it in an editor?
> > -----BEGIN CERTIFICATE-----
> > FSfwofidFWefiowdf90...
> > -----END CERTIFICATE-----
> 
> That's half of it.  I can import a public certificate to the keystore
> as long as the private key is already there.  I can't figure out how
> to get an existing private key into a keystore.  So, the certificate I
> have looks like what you have, and I also have a private key that
> looks like:



I found this page, which may help:

http://mark.foster.cc/kb/openssl-keytool.html




More information about the LUG mailing list