[libnet-sslglue-perl] 17/39: Imported Upstream version 0.8

dom at earth.li dom at earth.li
Thu Aug 27 18:38:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

dom pushed a commit to branch master
in repository libnet-sslglue-perl.

commit 878c1d5e46560bf8cc021cd7aefe3a6613dc74e5
Author: Dominic Hargreaves <dom at earth.li>
Date:   Mon Aug 29 17:29:04 2011 +0100

    Imported Upstream version 0.8
---
 Changes                 | 10 ++++++++++
 META.yml                |  4 ++--
 lib/Net/SSLGlue.pm      | 11 ++++++-----
 lib/Net/SSLGlue/LDAP.pm | 10 +++++-----
 lib/Net/SSLGlue/LWP.pm  | 24 ++++++++++++------------
 lib/Net/SSLGlue/SMTP.pm | 24 ++++++++++++++----------
 6 files changed, 49 insertions(+), 34 deletions(-)

diff --git a/Changes b/Changes
index be1102c..db2cdfe 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,13 @@
+0.8 2011/07/17
+fixed wrong position for include encode_base64 and uri_unescape in *::LWP.
+Thanks to mtelle[AT]kamp-dsl[DOT]de for reporting
+
+0.7 2011/05/27
+strip port from host/ip for name verification in Net::SSLGlue::SMTP
+
+0.6 2011/05/02
+fixed english, thanks to dom, https://rt.cpan.org/Ticket/Display.html?id=46284
+
 0.5 2011/02/03
 documentation fixes: http://rt.cpan.org/Ticket/Display.html?id=65258
 
diff --git a/META.yml b/META.yml
index d898d83..4f12db3 100644
--- a/META.yml
+++ b/META.yml
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Net-SSLGlue
-version:            0.5
+version:            0.8
 abstract:           ~
 author:  []
 license:            unknown
@@ -15,7 +15,7 @@ no_index:
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.54
+generated_by:       ExtUtils::MakeMaker version 6.55_02
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4
diff --git a/lib/Net/SSLGlue.pm b/lib/Net/SSLGlue.pm
index d518ad2..7ac03ec 100644
--- a/lib/Net/SSLGlue.pm
+++ b/lib/Net/SSLGlue.pm
@@ -1,5 +1,5 @@
 package Net::SSLGlue;
-our $VERSION = 0.5;
+our $VERSION = 0.8;
 
 =head1 NAME
 
@@ -8,11 +8,12 @@ Net::SSLGlue - add/extend SSL support for common perl modules
 =head1 DESCRIPTION
 
 Some commonly used perl modules don't have SSL support at all, even if the
-protocol would support it. Others have SSL support, but most of them don't do
-proper checking of the servers certificate.
+protocol supports it. Others have SSL support, but most of them don't do
+proper checking of the server's certificate.
 
-The C<Net::SSLGlue::*> modules try to add SSL support or proper certificate to
-these modules. Currently is support for the following modules available:
+The C<Net::SSLGlue::*> modules try to add SSL support or proper certificate
+checking to these modules. Currently support for the following modules is
+available:
 
 =over 4
 
diff --git a/lib/Net/SSLGlue/LDAP.pm b/lib/Net/SSLGlue/LDAP.pm
index d2bad6c..f969496 100644
--- a/lib/Net/SSLGlue/LDAP.pm
+++ b/lib/Net/SSLGlue/LDAP.pm
@@ -43,13 +43,13 @@ Net::SSLGlue::LDAP - proper certificate checking for ldaps in Net::LDAP
 L<Net::SSLGlue::LDAP> modifies L<Net::LDAP> so that it does proper certificate
 checking using the C<ldap> SSL_verify_scheme from L<IO::Socket::SSL>.
 
-Because L<Net::LDAP> does not have a mechanism to forward arbitrary parameter for
+Because L<Net::LDAP> does not have a mechanism to forward arbitrary parameters for
 the construction of the underlying socket these parameters can be set globally
-when including the package or with local settings of the
+when including the package, or with local settings of the
 C<%Net::SSLGlue::LDAP::SSLopts> variable.
 
-All of the C<SSL_*> parameter from L<IO::Socket::SSL> can be used, especially
-the following parameter is useful:
+All of the C<SSL_*> parameters from L<IO::Socket::SSL> can be used; the
+following parameter is especially useful:
 
 =over 4
 
@@ -57,7 +57,7 @@ the following parameter is useful:
 
 Usually the name given as the hostname in the constructor is used to verify the
 identity of the certificate. If you want to check the certificate against
-another name you might specify it with this parameter.
+another name you can specify it with this parameter.
 
 =back
 
diff --git a/lib/Net/SSLGlue/LWP.pm b/lib/Net/SSLGlue/LWP.pm
index 7443179..9eb83b8 100644
--- a/lib/Net/SSLGlue/LWP.pm
+++ b/lib/Net/SSLGlue/LWP.pm
@@ -1,11 +1,9 @@
 use strict;
 use warnings;
 package Net::SSLGlue::LWP;
-our $VERSION = 0.3;
+our $VERSION = 0.4;
 use LWP::UserAgent '5.822';
 use IO::Socket::SSL 1.19;
-use URI::Escape 'uri_unescape';
-use MIME::Base64 'encode_base64';
 use URI;
 
 # force Net::SSLGlue::LWP::Socket as superclass of Net::HTTPS, because
@@ -67,6 +65,8 @@ sub import {
 	use IO::Socket::SSL;
 	use base 'IO::Socket::SSL';
 	my $sockclass = 'IO::Socket::INET';
+	use URI::Escape 'uri_unescape';
+	use MIME::Base64 'encode_base64';
 	$sockclass .= '6' if eval "require IO::Socket::INET6";
 
 	sub configure {
@@ -160,35 +160,35 @@ Net::SSLGlue::LWP - proper certificate checking for https in LWP
 =head1 DESCRIPTION
 
 L<Net::SSLGlue::LWP> modifies L<Net::HTTPS> and L<LWP::Protocol::https> so that
-L<Net::HTTPS> is forced to use L<IO::Socket::SSL> instead of L<Crypt::SSLeay>
+L<Net::HTTPS> is forced to use L<IO::Socket::SSL> instead of L<Crypt::SSLeay>,
 and that L<LWP::Protocol::https> does proper certificate checking using the
 C<http> SSL_verify_scheme from L<IO::Socket::SSL>.
 
-Because L<LWP> does not have a mechanism to forward arbitrary parameter for
+Because L<LWP> does not have a mechanism to forward arbitrary parameters for
 the construction of the underlying socket these parameters can be set globally
-when including the package or with local settings of the
+when including the package, or with local settings of the
 C<%Net::SSLGlue::LWP::SSLopts> variable.
 
-All of the C<SSL_*> parameter from L<IO::Socket::SSL> can be used, especially
-the following parameters are useful:
+All of the C<SSL_*> parameter from L<IO::Socket::SSL> can be used; the
+following parameters are especially useful:
 
 =over 4
 
 =item SSL_ca_path, SSL_ca_file
 
 Specifies the path or a file where the CAs used for checking the certificates
-are located. Typical for UNIX systems is L</etc/ssl/certs>.
+are located. This is typically L</etc/ssl/certs> on UNIX systems.
 
 =item SSL_verify_mode
 
-If set to 0 disabled verification of the certificate. By default it is 1 which
-means, that the peer certificate is checked.
+If set to 0, verification of the certificate will be disabled. By default
+it is set to 1 which means that the peer certificate is checked.
 
 =item SSL_verifycn_name
 
 Usually the name given as the hostname in the constructor is used to verify the
 identity of the certificate. If you want to check the certificate against
-another name you might specify it with this parameter.
+another name you can specify it with this parameter.
 
 =back
 
diff --git a/lib/Net/SSLGlue/SMTP.pm b/lib/Net/SSLGlue/SMTP.pm
index 53a03ca..43c23ec 100644
--- a/lib/Net/SSLGlue/SMTP.pm
+++ b/lib/Net/SSLGlue/SMTP.pm
@@ -4,7 +4,7 @@ use warnings;
 package Net::SSLGlue::SMTP;
 use IO::Socket::SSL 1.19;
 use Net::SMTP;
-our $VERSION = 0.5;
+our $VERSION = 0.7;
 
 ##############################################################################
 # mix starttls method into Net::SMTP which on SSL handshake success 
@@ -13,10 +13,14 @@ our $VERSION = 0.5;
 sub Net::SMTP::starttls {
 	my $self = shift;
 	$self->_STARTTLS or return;
+	my $host = ${*$self}{net_smtp_host};
+	# for name verification strip port from domain:port, ipv4:port, [ipv6]:port
+	$host =~s{^(?:[^:]+|.+\])\:(\d+)$}{}; 
+
 	Net::SMTP::_SSLified->start_SSL( $self,
 		SSL_verify_mode => 1,
 		SSL_verifycn_scheme => 'smtp',
-		SSL_verifycn_name => ${*$self}{net_smtp_host},
+		SSL_verifycn_name => $host,
 		@_ 
 	);
 }
@@ -121,10 +125,10 @@ Net::SSLGlue::SMTP - make Net::SMTP able to use SSL
 
 =head1 DESCRIPTION
 
-L<Net::SSLGlue::SMTP> expands L<Net::SMTP> so one can either start directly with SSL
+L<Net::SSLGlue::SMTP> extends L<Net::SMTP> so one can either start directly with SSL
 or switch later to SSL using the STARTTLS command.
 
-By default it will take care to verfify the certificate according to the rules
+By default it will take care to verify the certificate according to the rules
 for SMTP implemented in L<IO::Socket::SSL>.
 
 =head1 METHODS
@@ -153,26 +157,26 @@ certificate. See the L<IO::Socket::SSL> documentation.
 =back
 
 All of these methods can take the C<SSL_*> parameter from L<IO::Socket::SSL> to
-change the behavior of the SSL connection. Especially the following parameter
-are useful:
+change the behavior of the SSL connection. The following parameters are
+especially useful:
 
 =over 4
 
 =item SSL_ca_path, SSL_ca_file
 
 Specifies the path or a file where the CAs used for checking the certificates
-are located. Typical for UNIX systems is L</etc/ssl/certs>.
+are located. This is typically L</etc/ssl/certs> on UNIX systems.
 
 =item SSL_verify_mode
 
-If set to 0 disabled verification of the certificate. By default it is 1 which
-means, that the peer certificate is checked.
+If set to 0, verification of the certificate will be disabled. By default
+it is set to 1 which means that the peer certificate is checked.
 
 =item SSL_verifycn_name
 
 Usually the name given as the hostname in the constructor is used to verify the
 identity of the certificate. If you want to check the certificate against
-another name you might specify it with this parameter.
+another name you can specify it with this parameter.
 
 =back
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-sslglue-perl.git



More information about the Pkg-perl-cvs-commits mailing list