Hello community, here is the log from the commit of package perl-IO-Socket-SSL checked in at Mon Apr 23 23:20:39 CEST 2007. -------- --- perl-IO-Socket-SSL/perl-IO-Socket-SSL.changes 2007-03-30 16:11:15.000000000 +0200 +++ /mounts/work_src_done/STABLE/perl-IO-Socket-SSL/perl-IO-Socket-SSL.changes 2007-04-23 13:57:07.000000000 +0200 @@ -1,0 +2,8 @@ +Mon Apr 23 13:31:13 CEST 2007 - anicka@suse.cz + +- update to 1.05 + * make session cache working even if the IO::Socket::SSL object + was not created with IO::Socket::SSL->new but with + IO::Socket::SSL->start_SSL on an established socket + +------------------------------------------------------------------- Old: ---- IO-Socket-SSL-1.04-store_set_flags.diff IO-Socket-SSL-1.04.tar.bz2 New: ---- IO-Socket-SSL-1.05-store_set_flags.diff IO-Socket-SSL-1.05.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-IO-Socket-SSL.spec ++++++ --- /var/tmp/diff_new_pack.A26822/_old 2007-04-23 23:20:34.000000000 +0200 +++ /var/tmp/diff_new_pack.A26822/_new 2007-04-23 23:20:34.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package perl-IO-Socket-SSL (Version 1.04) +# spec file for package perl-IO-Socket-SSL (Version 1.05) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,7 +12,7 @@ Name: perl-IO-Socket-SSL BuildRequires: perl-Net_SSLeay perl-libwww-perl -Version: 1.04 +Version: 1.05 Release: 1 Provides: p_iossl Obsoletes: p_iossl @@ -64,6 +64,11 @@ /var/adm/perl-modules/%{name} %changelog +* Mon Apr 23 2007 - anicka@suse.cz +- update to 1.05 + * make session cache working even if the IO::Socket::SSL object + was not created with IO::Socket::SSL->new but with + IO::Socket::SSL->start_SSL on an established socket * Fri Mar 30 2007 - anicka@suse.cz - update to 1.04 * added way to create SSL object with predefined session ++++++ IO-Socket-SSL-1.04-store_set_flags.diff -> IO-Socket-SSL-1.05-store_set_flags.diff ++++++ ++++++ IO-Socket-SSL-1.04.tar.bz2 -> IO-Socket-SSL-1.05.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Socket-SSL-1.04/Changes new/IO-Socket-SSL-1.05/Changes --- old/IO-Socket-SSL-1.04/Changes 2007-03-28 21:05:20.000000000 +0200 +++ new/IO-Socket-SSL-1.05/Changes 2007-04-16 21:20:48.000000000 +0200 @@ -1,3 +1,8 @@ +v1.05 + - make session cache working even if the IO::Socket::SSL object + was not created with IO::Socket::SSL->new but with + IO::Socket::SSL->start_SSL on an established socket + v1.04 - added way to create SSL object with predefined session cache, thus making it possible to share the cache between diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Socket-SSL-1.04/SSL.pm new/IO-Socket-SSL-1.05/SSL.pm --- old/IO-Socket-SSL-1.04/SSL.pm 2007-03-28 21:00:07.000000000 +0200 +++ new/IO-Socket-SSL-1.05/SSL.pm 2007-04-16 21:23:26.000000000 +0200 @@ -41,7 +41,7 @@ BEGIN { # Declare @ISA, $VERSION, $GLOBAL_CONTEXT_ARGS @ISA = qw(IO::Socket::INET); - $VERSION = '1.04'; + $VERSION = '1.05'; $GLOBAL_CONTEXT_ARGS = {}; #Make $DEBUG another name for $Net::SSLeay::trace @@ -212,6 +212,7 @@ || return $self->error("Failed to set SSL cipher list"); } + $arg_hash->{PeerAddr} || $self->_update_peer; my $session = $ctx->session_cache( $arg_hash->{PeerAddr}, $arg_hash->{PeerPort} ); Net::SSLeay::set_session($ssl, $session) if ($session); } @@ -246,6 +247,7 @@ $ctx ||= ${*$self}{'_SSL_ctx'}; if ( $ctx->has_session_cache ) { my $arg_hash = ${*$self}{'_SSL_arguments'}; + $arg_hash->{PeerAddr} || $self->_update_peer; my ($addr,$port) = ( $arg_hash->{PeerAddr}, $arg_hash->{PeerPort} ); my $session = $ctx->session_cache( $addr,$port ); $ctx->session_cache( $addr,$port, Net::SSLeay::get1_session($ssl) ) if !$session; @@ -256,6 +258,18 @@ return $self; } +# called if PeerAddr is not set in ${*$self}{'_SSL_arguments'} +# this can be the case if start_SSL is called with a normal IO::Socket::INET +# so that PeerAddr|PeerPort are not set from args +sub _update_peer { + my $self = shift; + my $arg_hash = ${*$self}{'_SSL_arguments'}; + eval { + my ($port,$addr) = sockaddr_in( getpeername( $self )); + $arg_hash->{PeerAddr} = inet_ntoa( $addr ); + $arg_hash->{PeerPort} = $port; + } +} #Call to accept occurs when a new client connects to a server using #IO::Socket::SSL @@ -1340,8 +1354,8 @@ You may use this to make IO::Socket::SSL automatically re-use a given session cache (unless specifically overridden in a call to new()). It accepts one argument, which should -be an IO::Socket::SSL::SessionCache object or similar (e.g something which implements -get_session and set_session like IO::Socket::SSL::SessionCache does). +be an IO::Socket::SSL::Session_Cache object or similar (e.g something which implements +get_session and add_session like IO::Socket::SSL::Session_Cache does). See the SSL_session_cache option of new() for more details. Note that this sets the default cache globally, so use with caution. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/IO-Socket-SSL-1.04/t/sessions.t new/IO-Socket-SSL-1.05/t/sessions.t --- old/IO-Socket-SSL-1.04/t/sessions.t 2006-12-01 10:35:44.000000000 +0100 +++ new/IO-Socket-SSL-1.05/t/sessions.t 2007-04-16 21:31:54.000000000 +0200 @@ -120,10 +120,15 @@ IO::Socket::SSL::set_default_context($ctx); - my @clients = (new IO::Socket::SSL(PeerAddr => $SSL_SERVER_ADDR, PeerPort => $SSL_SERVER_PORT), - new IO::Socket::SSL(PeerAddr => $SSL_SERVER_ADDR, PeerPort => $SSL_SERVER_PORT2), - new IO::Socket::SSL(PeerAddr => $SSL_SERVER_ADDR, PeerPort => $SSL_SERVER_PORT3)); - + my $sock3 = IO::Socket::INET->new( + PeerAddr => $SSL_SERVER_ADDR, + PeerPort => $SSL_SERVER_PORT3 + ); + my @clients = ( + IO::Socket::SSL->new(PeerAddr => $SSL_SERVER_ADDR, PeerPort => $SSL_SERVER_PORT), + IO::Socket::SSL->new(PeerAddr => $SSL_SERVER_ADDR, PeerPort => $SSL_SERVER_PORT2), + IO::Socket::SSL->start_SSL( $sock3 ), + ); if (!$clients[0] or !$clients[1] or !$clients[2]) { print "not ok \# Client init\n"; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org