Hi Masters,

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??

---> UPDATE <---
If I give to OpenSSL::RSA the result of executing this command in linux:
$ 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-----
I can load the private key, so now I need a way to get this openSSL pkcs8 convertion from DER to PEM with perl

In reply to Crypt::RSA Cant load private key by ulisescastillo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.