Horrrrriiibbbbllle

acme on 2004-01-27T11:00:09

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_cert));
Crazy! In other news, DateTime::Format::Strptime is shiny...


It's a C wrapper

2shortplanks on 2004-01-27T11:20:37

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?

Net::SSLeay is nasty

Dom2 on 2004-01-27T13:23:37

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.

-Dom

Easy modules

jhorwitz on 2004-01-27T16:43:42

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 volunteering... :)

Re:Easy modules

TeeJay on 2004-01-27T17:43:59

yup - this is why I created BagOfTricks for XML::Xerces.