Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

acme (189)

  (email not shown publicly)

Leon Brocard (aka acme) is an orange-loving Perl eurohacker with many varied contributions to the Perl community, including the GraphViz module on the CPAN. YAPC::Europe was all his fault. He is still looking for a Perl Monger group he can start which begins with the letter 'D'.

Journal of acme (189)

Tuesday January 27, 2004
06:00 AM


[ #17034 ]
I know it's a wrapper to a C library, but do I really have to write the following to get the expiry date for an SSL certificate using Net::SSLeay?

my ($p, $resp, $hdrs, $server_cert) = Net::SSLeay::get_https3($host, 443, '/');
my $expiry = Net::SSLeay::P_ASN1_UTCTIME_put2string(Net::SSLeay::X509_get_notAfter($server_ce rt));

Crazy! In other news, DateTime::Format::Strptime is shiny...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • It's a C wrapper (Score:3, Insightful)

    by 2shortplanks (968) on 2004.01.27 6:20 (#27775) Homepage Journal
    It's a wrapper to a C library. It should follow the C lib calling conventions as close as possible.

    Of course, then *that* should be wrapped in something nicer in Perl. Is that you volenteering Leon?

  • Whilst I agree it's a nasty interface, in place of a better one, I would settle for something documented. I was looking at the same thing as you a little while back and was >that close< to filing a bug report on RT until I stumbled over the QuickRef file [] by accident. The one that I'd never seen because CPAN installed it. Doh.


  • This is becoming a common theme, but it's all good in my opinion. A few years after I released Authen::Krb5, which *mostly* conforms to the very confusing MIT Kerberos 5 API, someone (with my blessing) wrote Authen::Krb5::Easy. It's a nice Perl wrapper around Authen::Krb5 that exports simpler implementations of the API to users who don't need the whole thing. Modules like this really help people get up and running quickly. Net::SSLeay could probably use something like this (no, that wasn't me volunteeri
    • yup - this is why I created BagOfTricks for XML::Xerces.

      @JAPH = qw(Hacker Perl Another Just);
      print reverse @JAPH;