Hi,
Could someone tell me if I'm doing this correctly?
I am writing an application which will use both Java and C++
clients/servers. To make this reasonable to use I would need
one set of certificates which can both be used by OpenSSL and
Java's JCE-IAIK toolkit. The funny thing is that I have
created a set of certificates and keys which seem to
work fine with the JCE but won't work will OpenSSL. This is
strange since I used OpenSSL to create the certs and keys.
My problem stems from the fact that the encrypted private key
seems unreadable by OpenSSL.
To create the cert and key I do the following:
- use CA.sh to create cert request.
- use CA.sh to sign request.
- cat newcert.pem newreq.pem > mycert.pem
- get the key:
openssl rsa -inform PEM -outform PEM -in mycert.pem -out mykey.pem
- convert pem to der and pkcs8:
openssl pkcs8 -inform PEM -outform DER -in mykey.pem -out mykey.der -topk8
- convert PEM cert to DER
openssl x509 -inform PEM -outform DER -in mycert.pem -out mycert.der
- convert CA cert to DER using same previous x509 call.
I then try to use these DER certs with my C++ and Java apps. The
Java app seems to work fine, however the C++ app can't seem to
read in the pkcs8 DER private key information. Is this possible?
Does anyone have an example code bit to offer on how to do this?
Thanks,
Cory
--
Cory Winter E-Mail: mailto:[EMAIL PROTECTED]
Software Developer WWW: http://www.ooc.com/
Object Oriented Concepts, Inc. Phone: (709) 738-3725
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]