Thanks for the link, but I've already seen that, and unfortunately it
didn't help...
When I open the PEM files with keys in a plain text editor, the contents
are different than what's shown on the linked page. In stead of:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,3F17F5316E2BAC89
...base64 encoded data...
-----END RSA PRIVATE KEY-----
there is just:
-----BEGIN RSA PRIVATE KEY-----
...base64 encoded data...
-----END RSA PRIVATE KEY-----
After decoding the "base64 encoded data", I get some binary data which I
don't know what to do with...
Dr. Stephen Henson pisze:
On Thu, Feb 05, 2009, Tomasz Ka??mierczak wrote:
Hello,
In the OpenSSL API there are functions called PEM_write_RSAPrivateKey(),
PEM_write_RSAPublicKey() and corresponding read functions:
PEM_read_RSAPrivateKey(), PEM_read_RSAPublicKey(). What I need is to
read/write RSA keys to/from a file in exactly the same format as these
functions do, but I cannot use OpenSSL (due to licensing issues when using
OpenSSL in GPL'd code). I've tried to find some GPL'd code that can handle
files in such format, but haven't succeeded.
What I've managed to find out is that it's a PKCS#1 certificate stored in a
PEM file - is that right? Unfortunately, even with such knowledge, I
haven't managed to find any specification that would be of any help.
RSAPublicKey and RSAPrivateKey are the same structures mentioned in PKCS#1
base64 encoded with the approproiate headers.
If you need the PEM encryption format then see:
http://www.openssl.org/docs/crypto/pem.html#PEM_ENCRYPTION_FORMAT
Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org