Codebase list libcrypt-ssleay-perl / afc7536
Inherit from IO::Socket::IP if available Test failure was due to change in error string fix that. Also, Socket provides a $CRLF constant. Use that instead of using a package global variable. A. Sinan Unur 9 years ago
2 changed file(s) with 12 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
11
22 use strict;
33 use MIME::Base64;
4 use Socket;
4 use Socket qw(:DEFAULT :crlf);
55 use Carp;
66
77 use vars qw(@ISA $VERSION $NEW_ARGS);
8 $VERSION = '2.86';
8 $VERSION = '2.87';
99 $VERSION = eval $VERSION;
1010
11 require IO::Socket;
12 @ISA=qw(IO::Socket::INET);
11 BEGIN {
12 if (require IO::Socket::IP) {
13 @ISA = qw( IO::Socket::IP );
14 }
15 else {
16 require IO::Socket;
17 @ISA = qw( IO::Socket::INET );
18 }
19 }
1320
1421 my %REAL; # private to this package only
1522 my $DEFAULT_VERSION = '23';
16 my $CRLF = "\015\012";
1723 my $SEND_USERAGENT_TO_PROXY = 0;
1824
1925 require Crypt::SSLeay;
1919 my $test_name = 'Net::SSL->new';
2020 if ($@) {
2121 my $fail = $@;
22 if ($fail =~ /\AConnect failed: connect: \b/i) {
22 if ($fail =~ /\AConnect failed:/i) {
2323 pass( "$test_name - expected failure" );
2424 }
2525 elsif ($fail =~ /\ASSL negotiation failed:/i) {