Sorry for reopening but I missed the fact that X509_check_ip() requires the address length because the address is in binary format.
The patch attached addresses that (it's against SVN 440).
Index: SSLeay.xs
===================================================================
--- SSLeay.xs (revision 440)
+++ SSLeay.xs (working copy)
@@ -2356,9 +2356,13 @@
RETVAL
int
-X509_check_ip(X509 *cert, const unsigned char *address, unsigned int flags = 0)
+X509_check_ip(X509 *cert, SV *address, unsigned int flags = 0)
+ INIT:
+ unsigned char *c_address;
+ size_t addresslen;
CODE:
- RETVAL = X509_check_ip(cert, address, 0, flags);
+ c_address = SvPV(address, addresslen);
+ RETVAL = X509_check_ip(cert, c_address, addresslen, flags);
OUTPUT:
RETVAL