OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  r...@openpkg.org
  Module: openpkg-src                      Date:   11-Oct-2009 10:45:03
  Branch: HEAD                             Handle: 2009101109450100

  Modified files:
    openpkg-src/perl-net    perl-net.patch perl-net.spec

  Log:
    add SSL transport support to Net::Stomp for STOMP-over-SSL
    communication

  Summary:
    Revision    Changes     Path
    1.35        +47 -8      openpkg-src/perl-net/perl-net.patch
    1.197       +1  -1      openpkg-src/perl-net/perl-net.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/perl-net/perl-net.patch
  ============================================================================
  $ cvs diff -u -r1.34 -r1.35 perl-net.patch
  --- openpkg-src/perl-net/perl-net.patch       6 May 2009 06:30:21 -0000       
1.34
  +++ openpkg-src/perl-net/perl-net.patch       11 Oct 2009 08:45:01 -0000      
1.35
  @@ -1,6 +1,6 @@
   Index: Net-Packet-3.26/Makefile.PL
  ---- Net-Packet-3.26/Makefile.PL.orig 2006-12-16 16:26:26 +0100
  -+++ Net-Packet-3.26/Makefile.PL      2008-01-01 22:05:18 +0100
  +--- Net-Packet-3.26/Makefile.PL.orig 2008-04-19 18:41:49 +0200
  ++++ Net-Packet-3.26/Makefile.PL      2009-10-11 10:33:36 +0200
   @@ -14,7 +14,6 @@
          Net::Libdnet  => 0,
          Time::HiRes   => 0,
  @@ -10,8 +10,8 @@
       },
       ABSTRACT_FROM => 'lib/Net/Packet.pm',
   Index: Net-Patricia-1.15/libpatricia/patricia.c
  ---- Net-Patricia-1.15/libpatricia/patricia.c.orig    2005-12-07 21:55:39 
+0100
  -+++ Net-Patricia-1.15/libpatricia/patricia.c 2008-01-01 22:05:18 +0100
  +--- Net-Patricia-1.15/libpatricia/patricia.c.orig    2009-04-19 06:28:15 
+0200
  ++++ Net-Patricia-1.15/libpatricia/patricia.c 2009-10-11 10:33:36 +0200
   @@ -38,24 +38,24 @@
    /* prefix_tochar
     * convert prefix information to bytes
  @@ -120,8 +120,8 @@
    
        assert (patricia);
   Index: Net-Patricia-1.15/libpatricia/patricia.h
  ---- Net-Patricia-1.15/libpatricia/patricia.h.orig    2005-12-07 21:54:52 
+0100
  -+++ Net-Patricia-1.15/libpatricia/patricia.h 2008-01-01 22:05:18 +0100
  +--- Net-Patricia-1.15/libpatricia/patricia.h.orig    2009-04-19 06:28:15 
+0200
  ++++ Net-Patricia-1.15/libpatricia/patricia.h 2009-10-11 10:33:36 +0200
   @@ -15,10 +15,10 @@
    #ifndef _PATRICIA_H
    #define _PATRICIA_H
  @@ -175,7 +175,7 @@
    
   Index: Net-Pcap-0.16/Makefile.PL
   --- Net-Pcap-0.16/Makefile.PL.orig   2007-12-24 00:06:15 +0100
  -+++ Net-Pcap-0.16/Makefile.PL        2008-01-01 22:08:20 +0100
  ++++ Net-Pcap-0.16/Makefile.PL        2009-10-11 10:33:36 +0200
   @@ -23,7 +23,8 @@
    }
    else {
  @@ -188,7 +188,7 @@
    for my $arg (@ARGV) {
   Index: Net-Pcap-0.16/Pcap.xs
   --- Net-Pcap-0.16/Pcap.xs.orig       2008-01-01 05:22:22 +0100
  -+++ Net-Pcap-0.16/Pcap.xs    2008-01-01 22:05:18 +0100
  ++++ Net-Pcap-0.16/Pcap.xs    2009-10-11 10:33:36 +0200
   @@ -33,7 +33,7 @@
    #define NEED_sv_2pv_nolen 1
    #include "ppport.h"
  @@ -198,3 +198,42 @@
    
    #ifdef _CYGWIN
    #include <Win32-Extensions.h>
  +Index: Net-Stomp-0.34/lib/Net/Stomp.pm
  +--- Net-Stomp-0.34/lib/Net/Stomp.pm.orig     2008-06-27 10:31:46 +0200
  ++++ Net-Stomp-0.34/lib/Net/Stomp.pm  2009-10-11 10:42:05 +0200
  +@@ -11,11 +11,21 @@
  + sub new {
  +     my $class  = shift;
  +     my $self   = $class->SUPER::new(@_);
  +-    my $socket = IO::Socket::INET->new(
  ++    my $socket;
  ++    my %sockopts = (
  +         PeerAddr => $self->hostname,
  +         PeerPort => $self->port,
  +         Proto    => 'tcp'
  +     );
  ++    if ($self->ssl) {
  ++        eval { use use IO::Socket::SSL; };
  ++        die "SSL transport required IO::Socket::SSL" if ($@);
  ++        %sockopts = (%sockopts, %{$self->ssl});
  ++        $socket = IO::Socket::SSL->new(%sockopts);
  ++    }
  ++    else {
  ++        $socket = IO::Socket::INET->new(%sockopts);
  ++    }
  +     die "Error connecting to " . $self->hostname . ':' . $self->port . ": 
$!"
  +         unless $socket;
  +     binmode($socket);
  +@@ -169,6 +179,12 @@
  + 
  +   my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61613' } 
);
  + 
  ++If you want to use SSL transport, pass in a hash named "ssl" with optional 
extra 
  ++options for the IO::Socket::SSL constructor (see its documentation for all 
possible options).
  ++
  ++  my $stomp = Net::Stomp->new( { hostname => 'localhost', port => '61612',
  ++                               ssl => { SSL_cipher_list => 'ALL:!EXPORT' } 
} );
  ++
  + =head2 connect
  + 
  + This connects to the Stomp server. You must pass in a login and
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/perl-net/perl-net.spec
  ============================================================================
  $ cvs diff -u -r1.196 -r1.197 perl-net.spec
  --- openpkg-src/perl-net/perl-net.spec        19 Sep 2009 09:56:44 -0000      
1.196
  +++ openpkg-src/perl-net/perl-net.spec        11 Oct 2009 08:45:01 -0000      
1.197
  @@ -67,7 +67,7 @@
   Group:        Perl
   License:      GPL/Artistic
   Version:      %{V_perl}
  -Release:      20090919
  +Release:      20091011
   
   #   package options
   %option       with_pcap   no
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to