Net::SSL::ExpireDate constructs the SSL handshake by hand and explicitly does a TLS 1.2 only request with only a handful of ciphers. It might be that the site you are trying to reach does not work with TLS 1.2 or does not support the ciphers offered by Net::SSL::ExpireDate. I would recommend that you instead use a library which is commonly used to establish SSL connections and which should work with almost every site. With IO::Socket::SSL you can get the expiration date like this:
use strict; use warnings; use IO::Socket::SSL; use IO::Socket::SSL::Utils; # ignore certificate errors since we only want to get the expiration # time and not transfer any sensitive data my $cl = IO::Socket::SSL->new( PeerAddr => 'www.google.com:443', SSL_verify => 0 ) or die "connect failed: $!, $SSL_ERROR"; my $cert = $cl->peer_certificate or die "no peer certificate"; print "expire=".localtime(CERT_asHash($cert)->{not_after})."\n";

In reply to Re: ssl details cgi script by noxxi
in thread ssl details cgi script by alokranjan

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.