I can't tell you the exact solution, but I had a quick look at your problem and I'll make some suggestions where you might want to look deeper.

IO::Socket::SSL uses Net::SSLeay as its wrapper around OpenSSL. The POD for the latter says it doesn't have a complete x509 interface and that dump_peer_certificate returns "selected" information.

There is a low-level routine in Net::SSLeay called sslcat that does more general things, including grabbing the whole certificate.

Perhaps using the lower-level Net::SSLeay stuff will get you a certificate you can save to a temp file and specify to Crypt::OpenSSL::X509. I haven't tried it, but that's where I'd start based on the docs for these three modules.


In reply to Re: Examining SSL Certificates of SMTP hosts using Perl by mr_mischief
in thread Examining SSL Certificates of SMTP hosts using Perl by foobar1977

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.