From: Simon M. <sim...@in...> - 2010-05-18 11:09:16
|
Dear all, I am trying to process the EK Certificate created through the APKI PCA implementation through openssl. The creation of the certificate works fine and i am able to output the pubic key through the java code. When I execute the following openssl command i get an error: openssl -inform PEM -in cert.pem -noout -modulus The error is: Modulus=unavailable 4716:error:0D09B0A3:asn1 encoding routines:d2i_PublicKey:unknown public key type:d2i_pu.c:125: 4716:error:0B077066:x509 certificate routines:X509_PUBKEY_get:err asn1 lib:x_pubkey.c:366: The JAVA code which stores the certificate in the file is: FileOutputStream fo = new FileOutputStream(filename); fo.write(iaik.utils.Util.toPemString(cert).getBytes()); fo.close(); It looks like the public key isn't encoded in the right manner. Has anyone a suggestion? Thank you in advance! Kind regards, Simon Mittelberger |