I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-12-29 21:34:56-08 by noxxi in response to 9608
Re: Need help in designing a ssl perl client connecting to ssl ...
I don't know why you use Net::Telnet to connect to another server, I would suggest either using IO::Socket::INET/INET6 and then upgrading to IO::Socket::SSL:
use IO::Socket::INET; use IO::Socket::SSL; my $sock = IO::Socket::INET->new( $host ) or die $!; IO::Socket::SSL->start_SSL( $sock, SSL_verify_mode => 1, # verify peer certificate SSL_ca_path => '/etc/ssl/certs', # against CA from this dir ) or die "SSL handshake failed: $SSL_ERROR"
or using IO::Socket::SSL directly:
use IO::Socket::SSL; my $sock = IO::Socket::SSL->new( PeerAddr => $host, SSL_verify_mode => 1, SSL_ca_path => '/etc/ssl/certs', ) or die "$SSL_ERROR|$!"
If you don't understand this I would suggest to study the documentation and have a look at the examples and test directory of the distribution: http://search.cpan.org/src/SULLR/IO-Socket-SSL-1.18/example/, http://search.cpan.org/src/SULLR/IO-Socket-SSL-1.18/t
Direct Responses: 9617 | Write a response