Hi,

Currently Net::SMTP::TLS fails with:

invalid SSL_version specified at 
/usr/local/libdata/perl5/site_perl/IO/Socket/SSL.pm line 308

and attached patch fixes the issue. I've noticed the issue a
while ago and during investigation found out that there is
Net::SMTP::TLS::ButMaintained module on CPAN.

Attached change is from above module, it fixes usage of newer
IO::Socket::SSL which is stricter about options supplied to
SSL_version in socket_to_SSL(). Comments?

-- 
best regards
q#
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/p5-Net-SMTP-TLS/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile    14 Dec 2011 14:58:57 -0000      1.5
+++ Makefile    30 Jun 2012 18:46:42 -0000
@@ -4,7 +4,7 @@
 
 MODULES=       cpan
 DISTNAME=      Net-SMTP-TLS-0.12
-REVISION=      1
+REVISION=      2
 CATEGORIES=    net mail
 
 # perl
Index: patches/patch-lib_Net_SMTP_TLS_pm
===================================================================
RCS file: /cvs/ports/net/p5-Net-SMTP-TLS/patches/patch-lib_Net_SMTP_TLS_pm,v
retrieving revision 1.1
diff -u -r1.1 patch-lib_Net_SMTP_TLS_pm
--- patches/patch-lib_Net_SMTP_TLS_pm   14 Dec 2011 14:58:57 -0000      1.1
+++ patches/patch-lib_Net_SMTP_TLS_pm   30 Jun 2012 18:46:42 -0000
@@ -1,9 +1,9 @@
 $OpenBSD: patch-lib_Net_SMTP_TLS_pm,v 1.1 2011/12/14 14:58:57 sthen Exp $
 
-Add fixes from Net::SMTP::TLS::ButMaintained 0.18
+Add fixes from Net::SMTP::TLS::ButMaintained 0.18 and 0.19
 
 --- lib/Net/SMTP/TLS.pm.orig   Tue Jan 17 14:36:34 2006
-+++ lib/Net/SMTP/TLS.pm        Wed Dec 14 14:57:11 2011
++++ lib/Net/SMTP/TLS.pm        Sat Jun 30 19:45:08 2012
 @@ -115,10 +115,14 @@ sub new {
        
        my $me  = bless \%args, $pkg;
@@ -20,6 +20,15 @@
        $me->hello(); # the first hello, 2nd after starttls
        $me->starttls() if not $args{NoTLS}; # why we're here, after all
        $me->login() if($me->{User} and $me->{Password});
+@@ -179,7 +183,7 @@ sub starttls {
+               croak "Invalid response for STARTTLS: $num $txt\n";
+       }
+       if(not IO::Socket::SSL::socket_to_SSL($me->{sock},
+-              SSL_version     =>      "SSLv3 TLSv1")){
++              SSL_version     =>      "TLSv1")){
+                       croak "Couldn't start TLS: 
".IO::Socket::SSL::errstr."\n";
+       }
+       $me->hello();
 @@ -251,7 +255,7 @@ sub auth_PLAIN{
        my $me  = shift;
        my $user= $me->{User};

Reply via email to