Smith Jason wrote:
> > Try reading in the certificate into a byte array and then see if you can
> convert it the X509 spec.
> 
>         KeyFactory kf = KeyFactory.getInstance("RSA");
>         X509EncodedKeySpec x509spec = new X509EncodedKeySpec(ByteArray);
>         PublicKey pk = kf.generatePublic(x509spec);
> 
> Maybe you can then write pk to file and try to import again.

This sounds rather complicated... As I don't know what is a byte array and how
to read a file in it!

Shouldn't the X509 cert created with OpenSSL work? Maybe it requires certain
information I left out -- I only put my CN and O entries in it?
 
> If all you need is a self signed certificate, then you can create that with
> the java key tool...

How do I do that with keytool? I just wasted a day while trying to figureout
how to accomplish that with OpenSSL and I wouldn't want to do that again...
I've managed to generate a keystore and a csr for my site, but how do I become
my own CA with keytool and sign the csr and make it a crt, could someone
kindly demonstrate to me?

Regards,
Peter

Reply via email to