balle has asked for the wisdom of the Perl Monks concerning the following question:

Hi all!

I try to establish a ssl connection with IO::Socket::SSL (newest version), but i always get the error

IO::Socket::INET6 configuration failed error:00000000:lib(0):func(0):reason(0)

I've read that I should also use the newest version of Socket6, but that still does not solve my problem.

Here's the code maybe someone can enlight me what I am doing wrong?

my $ssl_sock = new IO::Socket::SSL( PeerAddr => $host, PeerPort=> 23, Proto => 'tcp', Reuse => 1, SSL_verify_mode => 0, SSL_verifycn_scheme => undef) || warn "Problem establishing SSL so +cket: " . IO::Socket::SSL::errstr() . "\n";

TIA && have a nice day!

Balle

Replies are listed 'Best First'.
Re: IO::Socket::SSL problem
by Anonymous Monk on Sep 27, 2012 at 08:57 UTC
      I dont have any certificate files and I dont want to verify them. Thats why I tried SSL_verify_mode => 0 in the hope that will do it?
        So crank up the debuggery logging tracing output buddy
Re: IO::Socket::SSL problem
by Khen1950fx (Canon) on Sep 27, 2012 at 10:24 UTC
    Did you add :https to the host? Example:
    #!/usr/bin/perl use strict; use autodie; use warnings; use IO::Socket::SSL qw/debug3/; my $host = 'localhost:https'; my $ssl_sock = IO::Socket::SSL->new( PeerAddr => $host, PeerPort => 9000, Proto => 'tcp', Reuse => 1, ); $ssl_sock->close('SSL_ctx_free=1');
      No I didnt add :https to the host, because I want to use Net::Telnet afterwards.