Hello

Thank you for taking the time to reply to me. I'm guessing I shouldn't upload the original private key file here so will explaining the commands that I used to create the key file suffice or do I need to create a separate file in order to test. I'm listing the commands first as I am starting to wonder if I have done something wrong in the creation of the certificate.

On Linux I ran the following command.

openssl genrsa -des3 -out private_key.pem 2048

I selected a passphrase and this is the same string that goes into the code above in the $password string.

I then created the self signed certificate with the next command.

openssl req -new -x509 -key private_key.pem -out private_cert.pem -days 9125

At this point I entered details for the certificate DN information.

Finally, I created the public certificate from the private certificate.

openssl x509 -inform PEM -in private_cert.pem -outform DER -out public.cer

The resultant public.cer certificate is what we passed to the third party and they are using this file as the basis of the encryption for teh SAML token that is sent to us.

If the above looks to be correct then I'll create a test private key and look to add the value to the code.

Thanks again.


In reply to Re^2: Perl and Encrypted SAML Token by SquirrelHead
in thread Perl and Encrypted SAML Token by SquirrelHead

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.