Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to load an RSA private key from a file?

843811May 24 2007 — edited Oct 29 2009
Hi,
I'm a newbie in regards to the Security APIs and I have need to have an instance of 'PrivateKey' passed off to an library I'm working with (GData to be specific).

My public key was generated with OpenSSL and is a 1024-bit RSA key encoded in an X.509 certificate in PEM format. I also have my private key in a separate file and I would like to load the private key from that file and have it converted into correct instance of 'PrivateKey'. Can some one point in a general direction on how I would accomplish this?

Any help would be appreciated.

Thanks,
Justin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2009
Added on May 24 2007
7 comments
63,368 views