Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 621208 Details for
Bug 862937
Memory leak in perl-libwhisker2 resp. Net::SSLeay
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
libwhisker-init-ssl-engine.patch
libwhisker-init-ssl-engine.patch (text/plain), 4.30 KB, created by
Michal Ambroz
on 2012-10-04 01:08:53 UTC
(
hide
)
Description:
libwhisker-init-ssl-engine.patch
Filename:
MIME Type:
Creator:
Michal Ambroz
Created:
2012-10-04 01:08:53 UTC
Size:
4.30 KB
patch
obsolete
>--- /usr/share/perl5/vendor_perl/LW2.pm 2012-01-15 21:25:56.000000000 +0100 >+++ LW2.pm 2012-10-04 02:11:06.749772419 +0200 >@@ -63,6 +63,84 @@ > $LW2::VERSION="2.5"; > $PACKAGE='LW2'; > >+# BEGIN is at the end of the file. Here come the functions. >+ >+######################################################################## >+# >+=item B<init_ssl_engine> >+ >+Params: $lw_ssl_engine >+ >+Return: always returns undef >+ >+This function chooses the right SSL Engine and initializes SSL if needed. >+This has been done because SSLeay seems to have memory leaks and there >+was no other way to quickly change SSL Engine. >+lw_ssl_engine can have these values: >+ auto = autodetection where it uses SSL first >+ (this is the default upon loading the module) >+ SSL = Net::SSL >+ SSLeay = Net::SSLeay >+ >+Precondition for the function is that if you choose a specific library >+this library must be installed. >+ >+=cut >+ >+sub init_ssl_engine { >+ my ($lw_ssl_engine) = @_; >+ >+ # if user-specified, undef initialization in case user's desired lib is not available >+ if ($lw_ssl_engine ne 'auto') { >+ $LW_SSL_LIB = 0; >+ $_SSL_LIBRARY = undef; >+ } >+ >+ if ($lw_ssl_engine eq 'SSLeay'){ >+ # use Net::SSLeay as your SSL Library >+ eval "use Net::SSLeay"; >+ if ( !$@ ) { >+ $LW_SSL_LIB = 1; >+ $_SSL_LIBRARY = 'Net::SSLeay'; >+ Net::SSLeay::load_error_strings(); >+ Net::SSLeay::SSLeay_add_ssl_algorithms(); >+ Net::SSLeay::randomize(); >+ } >+ else { print "ERROR: $@\n"; exit; } >+ } elsif ($lw_ssl_engine eq 'SSL'){ >+ # use Net:SSL >+ eval "use Net::SSL"; >+ if ( !$@ ) { >+ $LW_SSL_LIB = 2; >+ $_SSL_LIBRARY = 'Net::SSL'; >+ } >+ else { print "ERROR: $@\n"; exit; } >+ } >+ else { >+ # assuming autodetection >+ eval "use Net::SSL"; >+ if ( !$@ ) { >+ $LW_SSL_LIB = 2; >+ $_SSL_LIBRARY = 'Net::SSL'; >+ } >+ else { >+ eval "use Net::SSLeay"; >+ if ( !$@ ) { >+ $LW_SSL_LIB = 1; >+ $_SSL_LIBRARY = 'Net::SSLeay'; >+ Net::SSLeay::load_error_strings(); >+ Net::SSLeay::SSLeay_add_ssl_algorithms(); >+ Net::SSLeay::randomize(); >+ } >+ } >+ } >+ >+return undef; >+ >+} #sub >+ >+######################################################################## >+# Module Initialization starts here > BEGIN { > package LW2; > $PACKAGE='LW2'; >@@ -74,37 +152,26 @@ > > $_SSL_LIBRARY = undef; > >- eval "use Socket"; >- if ( !$@ ) { >- eval "use Net::SSLeay"; # do we have SSL support? >- if ( !$@ ) { >- $LW_SSL_LIB = 1; >- $_SSL_LIBRARY = 'Net::SSLeay'; >- Net::SSLeay::load_error_strings(); >- Net::SSLeay::SSLeay_add_ssl_algorithms(); >- Net::SSLeay::randomize(); >- >- } >- else { >- eval "use Net::SSL"; >- if ( !$@ ) { >- $LW_SSL_LIB = 2; >- $_SSL_LIBRARY = 'Net::SSL'; >- } >- } >- >- if ( $^O !~ /Win32/ ) { >- eval "use POSIX qw(:errno_h :fcntl_h)"; >- if ($@) { $LW_NONBLOCK_CONNECT = 0; } >- } >- else { >- >- # taken from Winsock2.h >- *EINPROGRESS = sub { 10036 }; >- *EWOULDBLOCK = sub { 10035 }; >- } >+ # check for Socket >+ eval "use Socket"; >+ if ( $@ ) { >+ die('You have to install the module Socket'); >+ } >+ >+ # init SSL with autoconfig first. App can later override this >+ init_ssl_engine('auto'); >+ >+ if ( $^O !~ /Win32/ ) { >+ eval "use POSIX qw(:errno_h :fcntl_h)"; >+ if ($@) { $LW_NONBLOCK_CONNECT = 0; } > } >+ else { > >+ # taken from Winsock2.h >+ *EINPROGRESS = sub { 10036 }; >+ *EWOULDBLOCK = sub { 10035 }; >+ } >+ > } # BEGIN > > >@@ -113,7 +180,6 @@ > =item B<auth_brute_force> > > Params: $auth_method, \%req, $user, \@passwords [, $domain, $fail_code ] >- > Return: $first_valid_password, undef if error/none found > > Perform a HTTP authentication brute force against a server (host and URI >@@ -4430,7 +4496,7 @@ > $code .= '}}}'; > > eval "$code"; >- print "DEBUG: $code\n\n"; >+ #print "DEBUG: $code\n\n"; > $generated++; > } > >@@ -6443,6 +6509,7 @@ > die _utils_carp_common(@_); > } > >+ > =back > > =head1 SEE ALSO >@@ -6455,4 +6522,5 @@ > > =cut > >+ > 1;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 862937
: 621208 |
621841