Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Issue with LWP loading client certificate

by haj (Vicar)
on Jun 20, 2021 at 15:15 UTC ( [id://11134073]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11134073]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-24 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found