Hi.
I'm trying to extract the certificate and "rsa private key" from a pem file created with openssl, in a midlet application(J2ME). I've been able to extract the cert info using Bouncy castle ASN1 class, but I cannot get the private key data. I have the following code to extract the rsa private key and decrypt it, however, it throws an exception when I init the cipher.
The private key in the pem file I want to decrypt is something like this:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,F83023B53795F517
MwdlPLqo...
-----END RSA PRIVATE KEY-----
Could anybody told me what's wrong with the code, or tell me any alternative?
If I encrypt the private key with other algorithm, like AES, would be easier to decrypt the private key?
Thanks in advance.