in reply to Re^2: Issue with LWP loading client certificate
in thread Issue with LWP loading client certificate

I would guess that your privatekey.pfx is all you need. That extension is used for PKCS#12 files, which are containers usually having the certificate and the private key embedded.

An extra SSL_key_file must be PEM or DER (that's what the message says) but you should make progress by providing the .pfx file as SSL_cert_file and drop the SSL_key_file:

$ua = LWP::UserAgent->new; $ua->ssl_opts(SSL_cert_file => 'privatekey.pfx'); $ua->ssl_opts(SSL_passwd_cb => sub { return "passwordvaluehere"; } ); $ua->ssl_opts(SSL_use_cert => '1');

Replies are listed 'Best First'.
Re^4: Issue with LWP loading client certificate
by ffrost (Acolyte) on Jun 21, 2021 at 12:00 UTC

    That worked. It's finally working!