[prev in list] [next in list] [prev in thread] [next in thread]
List: opensuse-commit
Subject: commit perl-IO-Socket-SSL
From: root () Hilbert ! suse ! de (h_root)
Date: 2007-03-30 14:31:32
Message-ID: 20070330143133.0293C67816B () Hilbert ! suse ! de
[Download RAW message or body]
Hello community,
here is the log from the commit of package perl-IO-Socket-SSL
checked in at Fri Mar 30 16:31:32 CEST 2007.
--------
--- perl-IO-Socket-SSL/perl-IO-Socket-SSL.changes 2007-03-07 11:01:06.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-IO-Socket-SSL/perl-IO-Socket-SSL.changes 2007-03-30 \
16:11:15.000000000 +0200 @@ -1,0 +2,7 @@
+Fri Mar 30 16:02:45 CEST 2007 - anicka@suse.cz
+
+- update to 1.04
+ * added way to create SSL object with predefined session
+ cache
+
+-------------------------------------------------------------------
Old:
----
IO-Socket-SSL-1.03-store_set_flags.diff
IO-Socket-SSL-1.03.tar.bz2
New:
----
IO-Socket-SSL-1.04-store_set_flags.diff
IO-Socket-SSL-1.04.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-IO-Socket-SSL.spec ++++++
--- /var/tmp/diff_new_pack.L29186/_old 2007-03-30 16:31:24.000000000 +0200
+++ /var/tmp/diff_new_pack.L29186/_new 2007-03-30 16:31:24.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-IO-Socket-SSL (Version 1.03)
+# spec file for package perl-IO-Socket-SSL (Version 1.04)
#
# 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.03
+Version: 1.04
Release: 1
Provides: p_iossl
Obsoletes: p_iossl
@@ -64,6 +64,10 @@
/var/adm/perl-modules/%{name}
%changelog
+* Fri Mar 30 2007 - anicka@suse.cz
+- update to 1.04
+ * added way to create SSL object with predefined session
+ cache
* Wed Mar 07 2007 - anicka@suse.cz
- update to 1.03
* add CLONE_SKIP
++++++ IO-Socket-SSL-1.03-store_set_flags.diff -> \
IO-Socket-SSL-1.04-store_set_flags.diff ++++++
++++++ IO-Socket-SSL-1.03.tar.bz2 -> IO-Socket-SSL-1.04.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore \
old/IO-Socket-SSL-1.03/Changes new/IO-Socket-SSL-1.04/Changes
--- old/IO-Socket-SSL-1.03/Changes 2007-03-06 19:06:50.000000000 +0100
+++ new/IO-Socket-SSL-1.04/Changes 2007-03-28 21:05:20.000000000 +0200
@@ -1,3 +1,11 @@
+v1.04
+ - added way to create SSL object with predefined session
+ cache, thus making it possible to share the cache between
+ objects even if the rest of the context is not shared
+ key SSL_session_cache
+ Note that the arguments of IO::Socket::SSL::SessionCache::new
+ changed (but you should never have used this class directly
+ because it's internal to IO::Socket::SSL)
v1.03
- add CLONE_SKIP as proposed by
Jarrod Johnson jbjohnso at us dot ibm dot com
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore \
old/IO-Socket-SSL-1.03/SSL.pm new/IO-Socket-SSL-1.04/SSL.pm
--- old/IO-Socket-SSL-1.03/SSL.pm 2007-03-06 19:05:11.000000000 +0100
+++ new/IO-Socket-SSL-1.04/SSL.pm 2007-03-28 21:00:07.000000000 +0200
@@ -41,7 +41,7 @@
BEGIN {
# Declare @ISA, $VERSION, $GLOBAL_CONTEXT_ARGS
@ISA = qw(IO::Socket::INET);
- $VERSION = '1.03';
+ $VERSION = '1.04';
$GLOBAL_CONTEXT_ARGS = {};
#Make $DEBUG another name for $Net::SSLeay::trace
@@ -716,6 +716,10 @@
$GLOBAL_CONTEXT_ARGS->{'SSL_reuse_ctx'} = shift;
}
+sub set_default_session_cache {
+ $GLOBAL_CONTEXT_ARGS->{SSL_session_cache} = shift;
+}
+
sub opened {
my $self = shift;
@@ -921,13 +925,13 @@
Net::SSLeay::CTX_set_verify($ctx, $verify_mode, $verify_callback);
$ctx_object = { context => $ctx };
- if ($arg_hash->{'SSL_session_cache_size'}) {
- if ($Net::SSLeay::VERSION < 1.26) {
- return IO::Socket::SSL->error("Session caches not supported for Net::SSLeay < \
v1.26");
- } else {
- $ctx_object->{'session_cache'} =
- IO::Socket::SSL::Session_Cache->new($arg_hash) || undef;
- }
+ if ( my $cache = $arg_hash->{SSL_session_cache} ) {
+ # use predefined cache
+ $ctx_object->{session_cache} = $cache
+ } elsif ( my $size = $arg_hash->{SSL_session_cache_size}) {
+ return IO::Socket::SSL->error("Session caches not supported for Net::SSLeay < \
v1.26") + if $Net::SSLeay::VERSION < 1.26;
+ $ctx_object->{session_cache} = IO::Socket::SSL::Session_Cache->new( $size );
}
return bless $ctx_object, $class;
@@ -936,19 +940,16 @@
sub session_cache {
my $ctx = shift;
- my $cache = $ctx->{'session_cache'};
- return unless defined $cache;
- my ($addr, $port) = (shift, shift);
+ my $cache = $ctx->{'session_cache'} || return;
+ my ($addr,$port,$session) = @_;
my $key = "$addr:$port";
- my $session = shift;
-
- return (defined($session) ? $cache->add_session($key, $session)
- : $cache->get_session($key));
+ return defined($session)
+ ? $cache->add_session($key, $session)
+ : $cache->get_session($key);
}
sub has_session_cache {
- my $ctx = shift;
- return (defined $ctx->{'session_cache'});
+ return defined shift->{session_cache};
}
@@ -965,10 +966,9 @@
sub CLONE_SKIP { 1 }
sub new {
- my ($class, $arg_hash) = @_;
- my $cache = { _maxsize => $arg_hash->{'SSL_session_cache_size'}};
- return unless ($cache->{_maxsize} > 0);
- return bless $cache, $class;
+ my ($class, $size) = @_;
+ $size>0 or return;
+ return bless { _maxsize => $size }, $class;
}
@@ -987,12 +987,11 @@
sub add_session {
my ($self, $key, $val) = @_;
-
return if ($key eq '_maxsize' or $key eq '_head');
if ((keys %$self) > $self->{'_maxsize'} + 1) {
my $last = $self->{'_head'}->{prev};
- &Net::SSLeay::SESSION_free($last->{session});
+ Net::SSLeay::SESSION_free($last->{session});
delete($self->{$last->{key}});
$self->{'_head'}->{prev} = $self->{'_head'}->{prev}->{prev};
delete($self->{'_head'}) if ($self->{'_maxsize'} == 1);
@@ -1211,6 +1210,18 @@
stored at one time; the oldest sessions in the cache will be removed if new ones are
added.
+=item SSL_session_cache
+
+Specifies session cache object which should be used instead of creating a new.
+Overrules SSL_session_cache_size.
+This option is useful if you wan't to reuse the cache, but not the rest of
+the context.
+
+A session cache object can be created using
+C<< IO::Socket::SSL::Session_Cache->new( cachesize ) >>.
+
+Use set_default_session_cache() to set a global cache object.
+
=item SSL_error_trap
When using the accept() or connect() methods, it may be the case that the
@@ -1325,6 +1336,16 @@
the SSL_reuse_ctx option of new() for more details. Note that this sets the default
context globally, so use with caution (esp. in mod_perl scripts).
+=item B<IO::Socket::SSL::set_default_session_cache(...)>
+
+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).
+See the SSL_session_cache option of new() for more details. Note that this sets the \
default +cache globally, so use with caution.
+
+
=back
The following methods are unsupported (not to mention futile!) and IO::Socket::SSL
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic