Subject: | Patch to add SSL options and check for successful start_SSL |
Date: | Thu, 06 Jun 2013 19:53:16 +0300 |
To: | bug-Net-HTTPS-NB [...] rt.cpan.org |
From: | Heikki Vatiainen <hvn [...] open.com.au> |
Hello,
Net::HTTP::NB does not check for return value when calling
IO::Socket::SSL->start_SSL()
If start_SSL() fails, the socket 'will remain blessed in its original
class' as stated by IO::Socket:SSL documentation. Since the socket is
still valid, the subsequent communication will happen over plain HTTP
instead of HTTPS.
The attached patch adds check for return value.
Another thing the patch adds is the possibility to pass options such as
SSL_verify_mode and SSL_ca_file. This lets the caller to enable any
certificate checking and other options IO::Socket:SSL supports.
The patch is against Net::HTTPS::NB version 0.12
--
Heikki Vatiainen <hvn@open.com.au>
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.
Message body is not shown because sender requested not to inline it.