in reply to using Net SSLeay to send Client Certificate connect to remote host

Like haukex I wouldn't use such a low-level module by default. Here is an example using LWP::UserAgent and a known, public endpoint. Perhaps you can start from here and then modify to your needs?

#!/usr/bin/env perl use strict; use warnings; use LWP::UserAgent; use Data::Dumper; my $url = 'https://server.cryptomix.com/secure/'; my $keyfile = 'foo.key'; my $certfile = 'foo.cert'; my $ua = LWP::UserAgent->new ( ssl_opts => { SSL_cert_file => $certfile, SSL_key_file => $keyfile } ); my $res = $ua->get ($url); print $res->status_line; print $res->decoded_content;

This assumes that you have the RSA key in foo.key and the PEM client cert in foo.cert. You'll get lots of info back from that server.

Replies are listed 'Best First'.
Re^2: using Net SSLeay to send Client Certificate connect to remote host
by newperldeveloper (Sexton) on Mar 03, 2020 at 15:52 UTC
    Thanks this worked. I had this before but I was using IO::Socket module it should have worked but I will look into this a little more. I do not have a key file so I had to use
    my $ua = LWP::UserAgent->new ( ssl_opts => { SSL_cert_file => $certfile, SSL_passwd_cb => sub {$my_key}, } );
    I am new to perl and don't have to touch it often. Thanks
Re^2: using Net SSLeay to send Client Certificate connect to remote host
by newperldeveloper (Sexton) on Mar 03, 2020 at 14:28 UTC
    Thanks I will give this a shot. I tried this earlier but it did not work. I kept getting errors. I will do a post here to show results.