1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 00:02:29 +01:00
imapsync/W/bugs/bug_ssl_win32_3_http
Nick Bebout 6ff9b67554 1.547
2013-07-05 17:26:28 -05:00

34 lines
745 B
Perl
Executable File

#!/usr/bin/perl
use strict ;
use warnings ;
use English ;
use IO::Socket::SSL ;
printf( "Perl %vd", $PERL_VERSION ) ;
print
"\nIO::Socket $IO::Socket::VERSION\n" ,
"IO::Socket::INET $IO::Socket::INET::VERSION \n",
"IO::Socket::INET6 $IO::Socket::INET6::VERSION \n",
"IO::Socket::SSL $IO::Socket::SSL::VERSION \n",
"Net::SSLeay $Net::SSLeay::VERSION \n",
" \n",
;
my $sock = IO::Socket::SSL->new(
# where to connect
PeerHost => "www.google.com",
PeerPort => "https",
# certificate verification
SSL_verify_mode => SSL_VERIFY_NONE,
SSL_verifycn_schema => 'http',
) or die "failed connect or ssl handshake: $!,$SSL_ERROR";
# send and receive over SSL connection
print $sock "GET / HTTP/1.0\r\n\r\n";
print <$sock>;