ulisescastillo has asked for the wisdom of the Perl Monks concerning the following question:
Hi Masters,
If I give to OpenSSL::RSA the result of executing this command in linux:
I'm using ActivePerl v5.8.8 and downloaded the modules I need which are
use Crypt::OpenSSL::RSA; [v 0.22] OR Crypt::RSA [v 1.57] use XML::XSLT; use XML::LibXML;
From:
Describing Active Repository 2:
Name: perl5.8modules
Location: http://theoryx5.uwinnipeg.ca/ppms/
Type: Webpage
Because in newest perls I can't install them
But now I'm having a problem trying to load a privateKey to
sign a file, with openSSL I have the error:
RSA.xs:146: OpenSSL error: no start line at decryption.pl line 40.
$keyFile = shift; $rsa_priv = Crypt::OpenSSL::RSA->new_private_key($keyFile);
And when Trying this:
$keyFile = shift; $key = new Crypt::RSA::Key::Private ( Filename => $keyFile }
The error message is:
Can't use an undefined value as a HASH reference at C:/Perl/site/lib/Crypt/RSA/Key/Private.pm line 220.
Any Suggestion??
If I give to OpenSSL::RSA the result of executing this command in linux:
I can load the private key, so now I need a way to get this openSSL pkcs8 convertion from DER to PEM with perl$ openssl pkcs8 -inform DER -in aaqm610917qja_1011180955s.key Enter Password: -----BEGIN RSA PRIVATE KEY----- MIICWwIBAAKBgQCcphXGAbrbUnaumkSTsbGrFIfkaajOpvP1RFcVcbpWe7JBNXAw ShKIH79QGLYEc9ATBmlxtjAma0B4ZRBTjmQ4vQrp9LwT3bCNX+9J9lUOHGsCysya u3VxGNoCbhBxMYQP835LjAcy1d4AScOjGx8hxTZ6AUXtMmyEe+0NNQsJnQIDAQAB AoGAF4PfFOBBmpbgdgl2be1ozFPCqokp7Aun55OgtvlhjYX4Fk3dT4JvEbwiTfXH rRdtjs2Rmp5M0Bedj/Ur5D8l0BqBQznSrm6JGaDMv40wOk265qoECda/zZ2tdjvU xmcYpuu2AE4mdvqVsMqDOVCSp/5aBUL+hv54OtADuVi/J0ECQQDIa1DW9ct2FsQT h6sNdvgjI35fJ/MKA0y/kLD0wbwHT1VbUE3GevHHSeYOccKnWErlw4ppt9jglEvt m/n1BlOlAkEAyBdN4sKUxbTy1NobPgQJ2UsmaCNU7JN9+wIgJ8gePkRktsHLE+ec yBhBki3rYvexbXlmOU94yfrzzPZuyBkcmQJAfAr/o6vJW7NHdBb55YGGnqjvJBHj uITGUaJKA5KMv7F4UOXo3Tlmv0ObocEDCvP4lzBpUHk7P/RI8i0hjWd3CQJAal0p A//XwflclJWUobTX33C5a+ZMQK5u673Hhh41JXiJ6TS/VUdr6loqkSBj3mo5IS7F jnWWihgi/bOKVEg1EQJACsF3shzuBETh5dyoqBJRP7EbzxB8SaeQapa9lJlkrOKD HAwVS32OtPWCmU3isOjbqh+Mc3fNRe0Y9xq+nsingg== -----END RSA PRIVATE KEY-----
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Crypt::RSA Cant load private key
by toolic (Bishop) on Jan 09, 2012 at 18:35 UTC | |
by ulisescastillo (Initiate) on Jan 09, 2012 at 19:31 UTC | |
by Anonymous Monk on Jan 09, 2012 at 23:07 UTC | |
by ulisescastillo (Initiate) on Jan 10, 2012 at 00:40 UTC | |
by grantm (Parson) on Jan 10, 2012 at 08:39 UTC | |
| |
by Anonymous Monk on Jan 10, 2012 at 08:30 UTC | |
|
Back to
Seekers of Perl Wisdom