Mailinglist Archive: opensuse-commit (429 mails)
| < Previous | Next > |
commit perl-Net-SSLGlue for openSUSE:Factory
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Tue, 20 Jul 2010 20:45:13 +0200
- Message-id: <20100720184514.1629D202B9@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package perl-Net-SSLGlue for openSUSE:Factory
checked in at Tue Jul 20 20:45:13 CEST 2010.
--------
--- perl-Net-SSLGlue/perl-Net-SSLGlue.changes 2010-01-10 16:05:32.000000000
+0100
+++ /mounts/work_src_done/STABLE/perl-Net-SSLGlue/perl-Net-SSLGlue.changes
2010-07-20 15:58:02.000000000 +0200
@@ -1,0 +2,14 @@
+Tue Jul 20 13:51:48 UTC 2010 - chris@xxxxxxxxxxxxxxxx
+
+- update to 0.4
+ * added Changes, put examples into examples/ dir
+- 0.3 2010/05/13
+ * rewrite parts of Net::SSLGlue::LWP so that it sends the correct request
+ to the peer even if https_proxy is used. In former version it ommitted
+ the HTTP version number in the request (thus the request was invalid).
+ Bug report by PMOONEY https://rt.cpan.org/Ticket/Display.html?id=57365
+- recreated by cpanspec 1.78
+ o fix deps
+- noarch pkg
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
Net-SSLGlue-0.2.tar.gz
New:
----
Net-SSLGlue-0.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Net-SSLGlue.spec ++++++
--- /var/tmp/diff_new_pack.yCtzYn/_old 2010-07-20 20:44:27.000000000 +0200
+++ /var/tmp/diff_new_pack.yCtzYn/_new 2010-07-20 20:44:27.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-Net-SSLGlue (Version 0.2)
+# spec file for package perl-Net-SSLGlue (Version 0.4)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,55 +19,63 @@
Name: perl-Net-SSLGlue
-BuildRequires: perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-Socket6
-Url: http://search.cpan.org/search?module=Net::SSLGlue
-License: Artistic
-Group: Development/Libraries/Perl
-Requires: perl = %{perl_version}
-Requires: perl-IO-Socket-INET6 perl-Socket6
-AutoReqProv: on
+%define cpan_name Net-SSLGlue
Summary: Add/extend SSL support for common perl modules
-Version: 0.2
-Release: 3
-Source: Net-SSLGlue-%{version}.tar.gz
+Version: 0.4
+Release: 1
+License: GPL+ or Artistic
+Group: Development/Libraries/Perl
+Url: http://search.cpan.org/dist/Net-SSLGlue/
+Source:
http://www.cpan.org/modules/by-module/Net/Net-SSLGlue-%{version}.tar.gz
+BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: perl
+%if 0%{?suse_version} < 1120
+BuildRequires: perl-macros
+%endif
+BuildRequires: perl(IO::Socket::INET)
+BuildRequires: perl(IO::Socket::INET6)
+BuildRequires: perl(IO::Socket::SSL) >= 1.19
+BuildRequires: perl(LWP::UserAgent) >= 5.822
+Requires: perl = %{perl_version}
+Requires: perl(IO::Socket::INET)
+Requires: perl(IO::Socket::INET6)
+Requires: perl(IO::Socket::SSL) >= 1.19
+Requires: perl(LWP::UserAgent) >= 5.822
%description
-This Module provide proper certificate checking for https in LWP and
-IPv6 support
-
-
+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.
Authors:
--------
Steffen Ullrich
%prep
-%setup -n Net-SSLGlue-%{version}
+%setup -q -n %{cpan_name}-%{version}
%build
-perl Makefile.PL
-make %{?_smp_mflags}
-make test
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__make} %{?_smp_mflags}
+
+%check
+%{__make} test
%install
-make DESTDIR=$RPM_BUILD_ROOT install_vendor
-%perl_process_packlist
+%perl_make_install
+# do not perl_process_packlist (noarch)
+# remove .packlist file
+%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
+# remove perllocal.pod file
+%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
+%perl_gen_filelist
%clean
-rm -rf $RPM_BUILD_ROOT;
+%{__rm} -rf $RPM_BUILD_ROOT
-%files
-%defattr(-,root,root)
-%doc MANIFEST COPYRIGHT
-%dir %{perl_vendorarch}/auto/Net
-%dir %{perl_vendorarch}/auto/Net/SSLGlue
-%dir %{perl_vendorlib}/Net/
-%dir %{perl_vendorlib}/Net/SSLGlue
-%{perl_vendorlib}/Net/*.pm
-%{perl_vendorlib}/Net/SSLGlue/*.pm
-%{perl_vendorarch}/auto/Net/SSLGlue/.packlist
-%{_mandir}/man3/*
-/var/adm/perl-modules/perl-Net-SSLGlue
+%files -f %{name}.files
+%defattr(-,root,root,-)
+%doc Changes COPYRIGHT TODO examples
%changelog
++++++ Net-SSLGlue-0.2.tar.gz -> Net-SSLGlue-0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-SSLGlue-0.2/Changes new/Net-SSLGlue-0.4/Changes
--- old/Net-SSLGlue-0.2/Changes 1970-01-01 01:00:00.000000000 +0100
+++ new/Net-SSLGlue-0.4/Changes 2010-06-13 21:26:32.000000000 +0200
@@ -0,0 +1,22 @@
+0.4 2010/06/13
+added Changes, put examples into examples/ dir
+
+0.3 2010/05/13
+rewrite parts of Net::SSLGlue::LWP so that it sends the correct request
+to the peer even if https_proxy is used. In former version it ommitted
+the HTTP version number in the request (thus the request was invalid).
+Bug report by PMOONEY https://rt.cpan.org/Ticket/Display.html?id=57365
+
+0.2_1 2010/05/11
+document way to set different verification scheme for LWP
+requested by PMOONEY https://rt.cpan.org/Ticket/Display.html?57367
+
+0.2 2009/01/02
+https_proxy support for LWP, HTTPS_PROXY from Crypt::SSLeay did not work and
+the https_proxy from LWP was broken with both Crypt::SSLeay and
+IO::Socket::SSL (it did unencrypted https:// requests to the proxy).
+Fix it so that it now does CONNECT (this is the meaning of https_proxy for
+all other programs)
+
+0.1 2008/12/31
+initial release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-SSLGlue-0.2/MANIFEST new/Net-SSLGlue-0.4/MANIFEST
--- old/Net-SSLGlue-0.2/MANIFEST 2009-01-02 23:01:35.000000000 +0100
+++ new/Net-SSLGlue-0.4/MANIFEST 2010-06-13 21:32:24.000000000 +0200
@@ -9,4 +9,9 @@
t/external/03_lwp.t
TODO
COPYRIGHT
+examples/lwp.pl
+examples/lwp_post.pl
+examples/send-ssl-mail.pl
+examples/send-starttls-mail.pl
+Changes
META.yml Module meta-data (added by MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-SSLGlue-0.2/META.yml new/Net-SSLGlue-0.4/META.yml
--- old/Net-SSLGlue-0.2/META.yml 2009-01-02 23:01:35.000000000 +0100
+++ new/Net-SSLGlue-0.4/META.yml 2010-06-13 21:32:24.000000000 +0200
@@ -1,13 +1,21 @@
--- #YAML:1.0
-name: Net-SSLGlue
-version: 0.2
-abstract: ~
-license: ~
-author: ~
-generated_by: ExtUtils::MakeMaker version 6.44
-distribution_type: module
-requires:
- IO::Socket::SSL: 1.19
+name: Net-SSLGlue
+version: 0.4
+abstract: ~
+author: []
+license: unknown
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
+requires:
+ IO::Socket::SSL: 1.19
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.54
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-SSLGlue-0.2/examples/lwp.pl
new/Net-SSLGlue-0.4/examples/lwp.pl
--- old/Net-SSLGlue-0.2/examples/lwp.pl 1970-01-01 01:00:00.000000000 +0100
+++ new/Net-SSLGlue-0.4/examples/lwp.pl 2009-01-02 22:51:11.000000000 +0100
@@ -0,0 +1,8 @@
+use strict;
+use LWP::UserAgent;
+use Net::SSLGlue::LWP SSL_ca_path => '/etc/ssl/certs';
+
+my $ua = LWP::UserAgent->new;
+$ua->env_proxy;
+my $resp = $ua->get( 'https://www.comdirect.de' ) || die $@;
+print $resp->content;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-SSLGlue-0.2/examples/lwp_post.pl
new/Net-SSLGlue-0.4/examples/lwp_post.pl
--- old/Net-SSLGlue-0.2/examples/lwp_post.pl 1970-01-01 01:00:00.000000000
+0100
+++ new/Net-SSLGlue-0.4/examples/lwp_post.pl 2010-05-11 21:44:57.000000000
+0200
@@ -0,0 +1,16 @@
+use strict;
+use LWP::UserAgent;
+use Net::SSLGlue::LWP SSL_ca_path => '/etc/ssl/certs', SSL_verify_mode => 0;
+
+my $ua = LWP::UserAgent->new;
+$ua->env_proxy;
+my $resp = $ua->post( 'https://service.gmx.net/de/cgi/login', {
+ AREA => 1,
+ EXT => 'redirect',
+ EXT2 => '',
+ uinguserid => '__uuid__',
+ dlevel => 'c',
+ id => 'a',
+ p => 'b',
+}) || die $@;
+print $resp->as_string;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-SSLGlue-0.2/examples/send-ssl-mail.pl
new/Net-SSLGlue-0.4/examples/send-ssl-mail.pl
--- old/Net-SSLGlue-0.2/examples/send-ssl-mail.pl 1970-01-01
01:00:00.000000000 +0100
+++ new/Net-SSLGlue-0.4/examples/send-ssl-mail.pl 2010-06-13
21:31:06.000000000 +0200
@@ -0,0 +1,24 @@
+use strict;
+use warnings;
+
+use Net::SSLGlue::SMTP;
+my $smtp = Net::SMTP->new( 'mail.gmx.net',
+ SSL => 1,
+ SSL_ca_path => "/etc/ssl/certs",
+ Debug => 1
+) or die $@;
+die $smtp->peerhost.':'.$smtp->peerport;
+$smtp->auth( '123456','password' );
+$smtp->mail( 'me@xxxxxxxxxxx' );
+$smtp->to( 'you@xxxxxxxxxxx' );
+$smtp->data;
+$smtp->datasend( <<EOD );
+From: me
+To: you
+Subject: test test
+
+lalaal
+EOD
+$smtp->dataend;
+$smtp->quit;
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-SSLGlue-0.2/examples/send-starttls-mail.pl
new/Net-SSLGlue-0.4/examples/send-starttls-mail.pl
--- old/Net-SSLGlue-0.2/examples/send-starttls-mail.pl 1970-01-01
01:00:00.000000000 +0100
+++ new/Net-SSLGlue-0.4/examples/send-starttls-mail.pl 2010-06-13
21:31:36.000000000 +0200
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+
+use Net::SSLGlue::SMTP;
+my $smtp = Net::SMTP->new( 'mail.gmx.net', Debug => 1 ) or die $@;
+$smtp->starttls( SSL_ca_path => "/etc/ssl/certs" ) or die $@;
+$smtp->auth( '123456','password' );
+$smtp->mail( 'me@xxxxxxxxxxx' );
+$smtp->to( 'you@xxxxxxxxxxx' );
+$smtp->data;
+$smtp->datasend( <<EOD );
+From: me
+To: you
+Subject: test test
+
+lalaal
+EOD
+$smtp->dataend;
+$smtp->quit;
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-SSLGlue-0.2/lib/Net/SSLGlue/LWP.pm
new/Net-SSLGlue-0.4/lib/Net/SSLGlue/LWP.pm
--- old/Net-SSLGlue-0.2/lib/Net/SSLGlue/LWP.pm 2009-01-02 22:59:15.000000000
+0100
+++ new/Net-SSLGlue-0.4/lib/Net/SSLGlue/LWP.pm 2010-05-13 21:58:35.000000000
+0200
@@ -1,26 +1,26 @@
use strict;
use warnings;
package Net::SSLGlue::LWP;
-our $VERSION = 0.2;
+our $VERSION = 0.3;
use LWP::UserAgent '5.822';
use IO::Socket::SSL 1.19;
use URI::Escape 'uri_unescape';
use MIME::Base64 'encode_base64';
use URI;
-# force IO::Socket::SSL as superclass of Net::HTTPS, because
+# force Net::SSLGlue::LWP::Socket as superclass of Net::HTTPS, because
# only it can verify certificates
BEGIN {
- my $oc = $Net::HTTPS::SOCKET_CLASS;
- $Net::HTTPS::SOCKET_CLASS = my $need = 'IO::Socket::SSL';
+ my $oc = $Net::HTTPS::SSL_SOCKET_CLASS;
+ $Net::HTTPS::SSL_SOCKET_CLASS = my $need = 'Net::SSLGlue::LWP::Socket';
require Net::HTTPS;
require LWP::Protocol::https;
- if ( ( my $oc = $Net::HTTPS::SOCKET_CLASS ) ne $need ) {
+ if ( ( my $oc = $Net::HTTPS::SSL_SOCKET_CLASS ) ne $need ) {
# was probably loaded before, change ISA
grep { s{^\Q$oc\E$}{$need} } @Net::HTTPS::ISA
}
- die "cannot force IO::Socket:SSL into Net::HTTPS"
- if $Net::HTTPS::SOCKET_CLASS ne $need;
+ die "cannot force $need into Net::HTTPS"
+ if $Net::HTTPS::SSL_SOCKET_CLASS ne $need;
}
our %SSLopts; # set by local and import
@@ -63,23 +63,24 @@
{
- my $old_new = UNIVERSAL::can( 'LWP::Protocol::https::Socket','new' );
+ package Net::SSLGlue::LWP::Socket;
+ use IO::Socket::SSL;
+ use base 'IO::Socket::SSL';
my $sockclass = 'IO::Socket::INET';
- $sockclass .= '6' if eval "require IO::Socket::INET6" && ! $@;
- no warnings 'redefine';
- *LWP::Protocol::https::Socket::new = sub {
- my $class = shift;
- my %args = @_>1 ? @_ : ( PeerAddr => shift );
- my $phost = delete $args{HTTPS_proxy}
- || return $old_new->($class,%args);
+ $sockclass .= '6' if eval "require IO::Socket::INET6";
+
+ sub configure {
+ my ($self,$args) = @_;
+ my $phost = delete $args->{HTTPS_proxy}
+ or return $self->SUPER::configure($args);
$phost = URI->new($phost) if ! ref $phost;
- my $port = delete $args{PeerPort};
- my $host = delete $args{PeerHost} || delete $args{PeerAddr};
+ my $port = $args->{PeerPort};
+ my $host = $args->{PeerHost} || $args->{PeerAddr};
if ( ! $port ) {
$host =~s{:(\w+)$}{};
- $port = $args{PeerPort} = $1;
- $args{PeerHost} = $host;
+ $port = $args->{PeerPort} = $1;
+ $args->{PeerHost} = $host;
}
if ( $phost->scheme ne 'http' ) {
$@ = "scheme ".$phost->scheme." not supported for
https_proxy";
@@ -94,8 +95,16 @@
my $pport = $phost->port;
$phost = $phost->host;
- my $self = $sockclass->new( PeerAddr => $phost, PeerPort =>
$pport )
- or return;
+
+ # temporally downgrade $self so that the right connect chain
+ # gets called w/o doing SSL stuff. If we don't do it it will
+ # try to call IO::Socket::SSL::connect
+ my $ssl_class = ref($self);
+ bless $self,$sockclass;
+ $self->configure({ %$args, PeerAddr => $phost, PeerPort =>
$pport }) or do {
+ $@ = "connect to proxy $phost port $pport failed";
+ return;
+ };
print $self "CONNECT $host:$port HTTP/1.0\r\n$auth\r\n";
my $hdr = '';
while (<$self>) {
@@ -106,12 +115,17 @@
# error
$@ = "non 2xx response to CONNECT: $hdr";
return;
- } else {
- $class->start_SSL( $self,
- SSL_verifycn_name => $host,
- %args
- );
}
+
+ # and upgrade self by calling start_SSL
+ $ssl_class->start_SSL( $self,
+ SSL_verifycn_name => $host,
+ %$args
+ ) or do {
+ $@ = "start SSL failed: $SSL_ERROR";
+ return;
+ };
+ return $self;
};
}
@@ -129,7 +143,17 @@
{
local %Net::SSLGlue::LWP::SSLopts = %Net::SSLGlue::LWP::SSLopts;
- $Net::SSLGlue::LWP::SSLopts{SSL_verify_mode} = 0; # no
verification
+
+ # switch off verification
+ $Net::SSLGlue::LWP::SSLopts{SSL_verify_mode} = 0;
+
+ # or: set different verification policy, because cert does
+ # not conform to RFC (wildcards in CN are not allowed for https,
+ # but some servers do it anyway)
+ $Net::SSLGlue::LWP::SSLopts{SSL_verifycn_scheme} = {
+ wildcards_in_cn => 'anywhere',
+ check_cn => 'always',
+ };
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-SSLGlue-0.2/lib/Net/SSLGlue.pm
new/Net-SSLGlue-0.4/lib/Net/SSLGlue.pm
--- old/Net-SSLGlue-0.2/lib/Net/SSLGlue.pm 2009-01-02 22:58:57.000000000
+0100
+++ new/Net-SSLGlue-0.4/lib/Net/SSLGlue.pm 2010-06-13 21:26:41.000000000
+0200
@@ -1,5 +1,5 @@
package Net::SSLGlue;
-$VERSION = 0.2;
+$VERSION = 0.4;
=head1 NAME
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |