go ahead... be a heretic | |
PerlMonks |
Crypt::OpenSSL::RSA->new_public_key does not accept a x.509 public keyby mgr007 (Initiate) |
on Sep 16, 2015 at 16:42 UTC ( [id://1142212]=perlquestion: print w/replies, xml ) | Need Help?? |
mgr007 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm trying to verify a xml signed document. Reading the x.509 certificate works fine, as well as extracting the public key. But if try to read the key with Crypt::OpenSSL::RSA->new_public_keyI will get the error message RSA.xs:178: OpenSSL error: expecting an rsa key at blib/lib/Crypt/OpenSSL/RSA.pm (autosplit into blib/lib/auto/Crypt/OpenSSL/RSA/new_public_key.al) line 91, <STDIN> line 1.My code is:
$x509->pubkey seems correctly pem encoded (starting with "-----BEGIN PUBLIC KEY-----" ) and comes from a http://www.w3.org/2000/09/xmldsig signature compliant certificate. Is there a difference between a rsa public key and a x.509 public key ? What's the problem ? Do you have an idea ?
Back to
Seekers of Perl Wisdom
|
|