11
7
# Test to make sure that Net::SSLeay can be properly seeded!
12
8
unless (defined $ENV{EGD_PATH}) {
13
foreach (qw(/var/run/egd-pool /dev/egd-pool /etc/egd-pool /etc/entropy)) {
14
if (-S) { $ENV{EGD_PATH}=$_; last }
9
foreach (qw(/var/run/egd-pool /dev/egd-pool /etc/egd-pool /etc/entropy)) {
10
if (-S) { $ENV{EGD_PATH}=$_; last }
21
# issue warning, if Net::SSLeay cannot find random generator
22
# redefine __WARN__ only locally to allow detection of failures
24
local $SIG{__WARN__} = sub {
27
return unless $warning =~ /random/i;
28
print "Net::SSLeay could not find a random number generator on\n";
29
print "your system. This will likely cause most of the tests\n";
30
print "to fail. Please see the README file for more information.\n";
31
print "the message from Net::SSLeay was: $warning\n";
33
# Taken from ExtUtils::MakeMaker 6.16 (Michael Schwern) so that
34
# the prompt() function can be emulated for older versions of ExtUtils::MakeMaker.
35
my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
38
print "Do you REALLY want to continue? [Default: no] ";
39
die "User cancelled install!\n" if (<STDIN> !~ /^y(?:es)?$/);
41
die "Install cancelled.\n";
45
if (! defined $ENV{SKIP_RNG_TEST}) {
46
eval { require Net::SSLeay; $Net::SSLeay::trace=1; Net::SSLeay::randomize(); };
47
die $@ if $@ =~ /cancelled/;
17
# issue warning, if Net::SSLeay cannot find random generator
18
# redefine __WARN__ only locally to allow detection of failures
20
local $SIG{__WARN__} = sub {
23
return unless $warning =~ /random/i;
24
print "Net::SSLeay could not find a random number generator on\n";
25
print "your system. This will likely cause most of the tests\n";
26
print "to fail. Please see the README file for more information.\n";
27
print "the message from Net::SSLeay was: $warning\n";
29
# Taken from ExtUtils::MakeMaker 6.16 (Michael Schwern) so that
30
# the prompt() function can be emulated for older versions of ExtUtils::MakeMaker.
31
my $isa_tty = -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
34
print "Do you REALLY want to continue? [Default: no] ";
35
die "User cancelled install!\n" if (<STDIN> !~ /^y(?:es)?$/);
49
print "Random Number Generator test skipped.\n";
37
die "Install cancelled.\n";
41
if (! defined $ENV{SKIP_RNG_TEST}) {
42
eval { require Net::SSLeay; $Net::SSLeay::trace=1; Net::SSLeay::randomize(); };
43
die $@ if $@ =~ /cancelled/;
45
print "Random Number Generator test skipped.\n";
50
# don't support too old OpenSSL versions anymore, only causes trouble
53
Net::SSLeay::OPENSSL_VERSION_NUMBER()
56
"minimal required version for OpenSSL is 0.9.8, but your Net::SSLeay reports 0x%08x",
57
$openssl) if $openssl && $openssl < 0x00908000;
53
60
# make sure that we have dualvar from the XS Version of Scalar::Util
54
61
if ( eval { require Scalar::Util } ) {
55
eval { Scalar::Util::dualvar( 0,'' ) };
56
die "You need the XS Version of Scalar::Util for dualvar() support" if ($@);
62
eval { Scalar::Util::dualvar( 0,'' ) };
63
die "You need the XS Version of Scalar::Util for dualvar() support" if ($@);
59
66
# check if we have something which handles IDN
60
67
if ( ! eval { require Net::IDN::Encode } and ! eval { require Net::LibIDN } and ! eval { require URI; URI->VERSION(1.50) }) {
64
71
No library for handling international domain names found.
73
if ( eval { require Net::SSLeay } and $Net::SSLeay::VERSION <1.33 ) {
77
You have version $Net::SSLeay::VERSION of Net::SSLeay.
78
Support for subjectAltNames in certificates is only available in Version >=1.33
79
so verifying a hostname against the certificate will not work.
80
It is recommended to upgrade to a current Net::SSLeay.
85
80
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
86
81
# the contents of the Makefile that is written.
88
'NAME' => 'IO::Socket::SSL',
89
'AUTHOR' => 'Steffen Ullrich & Peter Behroozi & Marko Asplund',
90
'ABSTRACT' => 'Nearly transparent SSL encapsulation for IO::Socket::INET.',
91
'VERSION_FROM' => 'SSL.pm',
92
'DISTNAME' => 'IO-Socket-SSL',
94
'Net::SSLeay' => 1.21,
83
'NAME' => 'IO::Socket::SSL',
84
'ABSTRACT' => 'Nearly transparent SSL encapsulation for IO::Socket::INET.',
85
'AUTHOR' => "Steffen Ullrich <sullr@cpan.org>, Peter Behroozi, Marko Asplund",
87
'DISTNAME' => 'IO-Socket-SSL',
88
'VERSION_FROM' => 'lib/IO/Socket/SSL.pm',
90
'Net::SSLeay' => 1.46,
93
'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz', },
94
$ExtUtils::MakeMaker::VERSION >= 6.46 ? (
97
license => 'http://dev.perl.org/licenses/',
98
repository => 'https://github.com/noxxi/p5-io-socket-ssl',
99
homepage => 'https://github.com/noxxi/p5-io-socket-ssl',
100
bugtracker => 'https://rt.cpan.org/Dist/Display.html?Queue=IO-Socket-SSL',
97
'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz', },