Subject: | bug in Crypt::OpenSSL::X509 checkend() method |
The (undocumented) checkend() method doesn't do the right thing: It should return an SV* not an IV. See the attached patch for the correction.
--- Crypt-OpenSSL-X509-0.3.1/X509.xs Mon Nov 22 23:06:50 2004
+++ Crypt-OpenSSL-X509-0.3.1-patched/X509.xs Mon Jul 25 13:46:01 2005
@@ -381,7 +381,7 @@
OUTPUT:
RETVAL
-IV
+SV*
checkend(x509, checkoffset)
Crypt::OpenSSL::X509 x509;
IV checkoffset;
@@ -395,9 +395,9 @@
/* given an offset in seconds, will the certificate be expired? */
if (ASN1_UTCTIME_cmp_time_t(X509_get_notAfter(x509), now + (int)checkoffset) == -1) {
- RETVAL = (IV)&PL_sv_yes;
+ RETVAL = &PL_sv_yes;
} else {
- RETVAL = (IV)&PL_sv_no;
+ RETVAL = &PL_sv_no;
}
OUTPUT: