#!/usr/bin/perl

use IO::Socket::SSL;
my $client = IO::Socket::SSL->new(
	PeerAddr          => "10.60.0.100",
	PeerPort          => "5900",
	'SSL_version'     => 'SSLv3',
	'SSL_cipher_list' => 'RC4-MD5'
);

if ( !defined $client ) {
	die "I encountered a problem: ", IO::Socket::SSL::errstr();
}
else {
	print STDERR "Connected!\n";
}

print "SSL cipher: " . $client->get_cipher() . "\n";
print "Cert: " . $client->dump_peer_certificate() . "\n";

print $client <<END;
GET / HTTP/1.0\r\n\r\n
END

@output = <$client>;

print @output;
print "\n";
close $client;

