in reply to Re: How to convert curl authentication method to perl (client certificate)
in thread How to convert curl authentication method to perl
The above code give an error failed connect or ssl handshake: Invalid argument,IO::Socket::IP configuration failed When I comment out peerhost and port I nothing happens. Not sure what to do next. When I print dumper is outputs $VAR1 = bless( \*Symbol::GEN0, 'IO::Socket::SSL' ); Any help is greatly appreciated.my $client = IO::Socket::SSL->new( # where to connect PeerHost => "example/gettoken", PeerPort => "https" SSL_cert_file => $cert_file, # typical CA file on BSD SSL_passwd_cb => sub {"secret_key"}, ) or die "failed connect or ssl handshake: $!,$SSL_ERROR"; # send and receive over SSL connection print $client "GET / HTTP/1.0\r\n\r\n"; print <$client>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to convert curl authentication method to perl (client certificate)
by Corion (Patriarch) on Feb 28, 2020 at 19:58 UTC |