11 @uris = split(/:/, $ENV{SSLEAY_URIS}) if exists $ENV{SSLEAY_URIS};
13 plan tests => scalar @uris * 2;
16 plan skip_all => 'No external hosts specified for SSL testing';
20 use Symbol qw(gensym);
21 use Net::SSLeay::Handle;
23 # On some platforms, such as Solaris, the act of resolving the host name
24 # opens (and leaves open) a connection to the DNS client, which breaks
25 # the fd counting algorithm below. Make sure the DNS is operating before
26 # we count the FDs for the first time.
28 my $dummy = gethostbyname($uri);
31 my $fdcount_start = count_fds();
36 tie(*$ssl, "Net::SSLeay::Handle", $uri, 443);
37 print $ssl "GET / HTTP/1.0\r\n\r\n";
39 my $response = do { local $/ = undef; <$ssl> };
40 like( $response, qr/^HTTP\/1/s, 'correct response' );
43 my $fdcount_end = count_fds();
44 is ($fdcount_end, $fdcount_start, 'handle gets destroyed when it goes out of scope');
48 my $fdpath = File::Spec->devnull();
50 open($fh, $fdpath) or die;
51 my $count = fileno($fh);