.gear/rules | 2 + .../tags/7d6f3b4bf0046eb122cf5e27556104ad60ca8a62 | 13 ++ .gear/tags/list | 1 + examples/get_authenticated_page.pl | 2 +- lib/Net/SSLeay.pm | 33 +++--- perl-Net-SSLeay.spec | 124 ++++++++++++++++++++ 6 files changed, 160 insertions(+), 15 deletions(-) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..31f3b27 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,2 @@ +tar: @version@:. name=Net-SSLeay-@version@ +diff: @version@:. . name=perl-Net-SSLeay-@version@-@release@.patch diff --git a/.gear/tags/7d6f3b4bf0046eb122cf5e27556104ad60ca8a62 b/.gear/tags/7d6f3b4bf0046eb122cf5e27556104ad60ca8a62 new file mode 100644 index 0000000..303eaef --- /dev/null +++ b/.gear/tags/7d6f3b4bf0046eb122cf5e27556104ad60ca8a62 @@ -0,0 +1,13 @@ +object 5df49eaf3e4d708120fe86a02a407cfc68d75cc1 +type commit +tag 1.36 +tagger Alexey Tourbin 1267605484 +0300 + +1.36 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.10 (GNU/Linux) + +iEYEABECAAYFAkuOH+wACgkQfBKgtDjnu0bmqQCgqfOb43caeY730YKObLcf9DHv +bhsAoI+/yW72GXpRr5mI8e7lsYYPrHwJ +=KEdh +-----END PGP SIGNATURE----- diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..65602e2 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +7d6f3b4bf0046eb122cf5e27556104ad60ca8a62 1.36 diff --git a/examples/get_authenticated_page.pl b/examples/get_authenticated_page.pl index 24aa024..1e61d49 100755 --- a/examples/get_authenticated_page.pl +++ b/examples/get_authenticated_page.pl @@ -13,7 +13,7 @@ die "Usage: ./get_authenticated_page.pl user pass www.bacus.com 443 /\n" ($page, $result, %headers) = get_https($site, $port, $path, make_headers('Authorization' => - 'Basic ' . MIME::Base64::encode("$user:$pass")) + 'Basic ' . MIME::Base64::encode("$user:$pass",'')) ); print "Result was `$result'\n"; diff --git a/lib/Net/SSLeay.pm b/lib/Net/SSLeay.pm index e4ae991..dc7b751 100644 --- a/lib/Net/SSLeay.pm +++ b/lib/Net/SSLeay.pm @@ -669,15 +669,8 @@ sub AUTOLOAD { goto &$AUTOLOAD; } -eval { - require XSLoader; - XSLoader::load('Net::SSLeay', $VERSION); - 1; -} or do { - require DynaLoader; - push @ISA, 'DynaLoader'; - bootstrap Net::SSLeay $VERSION; -}; +require XSLoader; +XSLoader::load('Net::SSLeay', $VERSION); # Preloaded methods go here. @@ -1840,7 +1833,7 @@ sub debug_read { sub ssl_read_all { my ($ssl,$how_much) = @_; - $how_much = 2000000000 unless $how_much; + $how_much = 200000000 unless $how_much; my ($got, $errs); my $reply = ''; @@ -1860,7 +1853,7 @@ sub ssl_read_all { sub tcp_read_all { my ($how_much) = @_; - $how_much = 2000000000 unless $how_much; + $how_much = 200000000 unless $how_much; my ($n, $got, $errs); my $reply = ''; @@ -2070,7 +2063,7 @@ sub ssl_read_until ($;$$) { # N.B. 0.9.6a has security problems, so the support for # anything earlier than 0.9.6e will be dropped soon. if (&Net::SSLeay::OPENSSL_VERSION_NUMBER >= 0x0090601f) { - $max_length = 2000000000 unless (defined $max_length); + $max_length = 200000000 unless (defined $max_length); my ($pending, $peek_length, $found, $done); while (blength($reply) < $max_length and !$done) { #Block if necessary until we get some data @@ -2246,6 +2239,18 @@ sub new_x_ctx { } ### +### Wrap load_error_strings so it is only called once +### to avoid leaking like a sieve +### + +my $load_error_strings_state = 0; +sub load_error_strings_wrapper { + return if $load_error_strings_state == 1; + $load_error_strings_state = 1; + load_error_strings(); +} + +### ### Basic request - response primitive (don't use for https) ### @@ -2259,7 +2264,7 @@ sub sslcat { # address, port, message, $crt, $key --> reply / (reply,errs,cert) ### Do SSL negotiation stuff warn "Creating SSL $ssl_version context...\n" if $trace>2; - load_error_strings(); # Some bloat, but I'm after ease of use + load_error_strings_wrapper(); # Some bloat, but I'm after ease of use SSLeay_add_ssl_algorithms(); # and debuggability. randomize(); @@ -2389,7 +2394,7 @@ sub https_cat { # address, port, message --> returns reply / (reply,errs,cert) ### Do SSL negotiation stuff warn "Creating SSL $ssl_version context...\n" if $trace>2; - load_error_strings(); # Some bloat, but I'm after ease of use + load_error_strings_wrapper(); # Some bloat, but I'm after ease of use SSLeay_add_ssl_algorithms(); # and debuggability. randomize(); diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec new file mode 100644 index 0000000..9cb14fa --- /dev/null +++ b/perl-Net-SSLeay.spec @@ -0,0 +1,124 @@ +%define dist Net-SSLeay +Name: perl-Net-SSLeay +Version: 1.36 +Release: alt1.1 + +Summary: Perl extension for using OpenSSL +License: BSD-style +Group: Development/Perl + +URL: %CPAN %dist +Source: %dist-%version.tar +Patch: %name-%version-%release.patch + +Provides: perl-Net_SSLeay = %version +Obsoletes: perl-Net_SSLeay < %version + +# Automatically added by buildreq on Wed Mar 03 2010 +BuildRequires: libssl-devel openssl perl-Devel-StackTrace perl-Module-Install perl-Test-Exception perl-Test-NoWarnings perl-Test-Pod perl-Test-Warn + +%description +This module offers some high level convinience functions for accessing +web pages on SSL servers, a sslcat() function for writing your own +clients, and finally access to the SSL api of SSLeay/OpenSSL package +so you can write servers or clients for more complicated applications. + +%prep +%setup -q -n %dist-%version +%patch -p1 + +%build +%perl_vendor_build LIBS='-lssl -lcrypto' + +%install +%perl_vendor_install + +%files +%doc Changes Credits README examples QuickRef +%dir %perl_vendor_archlib/Net +%perl_vendor_archlib/Net/SSLeay* +%dir %perl_vendor_autolib/Net +%perl_vendor_autolib/Net/SSLeay + +%changelog +* Thu Nov 04 2010 Vladimir Lettiev 1.36-alt1.1 +- rebuilt with perl 5.12 + +* Wed Mar 03 2010 Alexey Tourbin 1.36-alt1 +- 1.35 -> 1.36 + +* Sun Aug 24 2008 Alexey Tourbin 1.35-alt2 +- rebuilt with libssl.so.7 + +* Sun Jul 27 2008 Alexey Tourbin 1.35-alt1 +- 1.33_01 -> 1.35 + +* Fri Mar 07 2008 Alexey Tourbin 1.33_01-alt1 +- 1.25 -> 1.33_01 +- changed license tag to "BSD-like" (that of OpenSSL) + +* Fri Dec 29 2006 ALT QA Team Robot 1.25-alt3.1 +- Rebuilt due to libcrypto.so.4 -> libcrypto.so.6 soname change. + +* Thu Mar 17 2005 Alexey Tourbin 1.25-alt3 +- sync with debian libnet-ssleay-perl_1.25-1.1: + + fix insecure entropy source in SSLeay.pm (CAN-2005-0106) + + fixes two outstanding memory leaks in SSLeay.pm + + fixes broken usage of MIME::Base64 in example +- manual pages not packaged (use perldoc) + +* Sat Feb 19 2005 ALT QA Team Robot 1.25-alt2.1.1 +- Rebuilt with rpm-build-perl-0.5.1. + +* Mon May 10 2004 ALT QA Team Robot 1.25-alt2.1 +- Rebuilt with openssl-0.9.7d. + +* Wed Mar 24 2004 Alexey Tourbin 1.25-alt2 +- don't contact external sites during tests when inside BTE +- updated description +- packaged QuickRef + +* Fri Oct 17 2003 Alexey Tourbin 1.25-alt1 +- 1.22 -> 1.25 +- package renamed: perl-Net_SSLeay -> perl-Net-SSLeay +- patch for Makefile.PL updated +- out-of-memory.patch: reduce big defaults (2G -> 200M) + +* Fri Mar 21 2003 Stanislav Ievlev 1.22-alt1 +- 1.22 + +* Wed Nov 06 2002 Stanislav Ievlev 1.21-alt2 +- fixed library link + +* Wed Nov 06 2002 Stanislav Ievlev 1.21-alt1 +- rebuild with new perl + +* Fri Jun 14 2002 Stanislav Ievlev 1.17-alt1 +- 1.17 + +* Wed Mar 27 2002 Stanislav Ievlev 1.13-alt1 +- 1.13 + +* Thu Nov 22 2001 Dmitry V. Levin 1.05-ipl8mdk +- Specfile cleanup. +- Added some more useless provides. + +* Mon Jul 23 2001 Stanislav Ievlev 1.05-ipl7mdk +- Rebuilt with new perl again + +* Mon Jun 25 2001 Konstantin Volckov 1.05-ipl6mdk +- Rebuilt with perl-5.6.1 +- Some spec cleanup + +* Sun Feb 4 2001 AEN +- RE adaptation + +* Fri Sep 1 2000 Philippe Libat 1.05-4mdk +- corrected /usr/local/bin + +* Thu Aug 31 2000 Philippe Libat 1.05-3mdk +- doc +- macroszifications. + +* Tue Aug 10 1999 Rex Wu +- Spec file was generated.