Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

LWP::UserAgent and Passphrase protected Certificates

by Sifmole (Chaplain)
on Aug 25, 2005 at 17:40 UTC ( #486661=perlquestion: print w/ replies, xml ) Need Help??
Sifmole has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I am attempting to get LWP::UserAgent to properly handly a connection which requires a protected certificate. My current issue is that no matter which way I have tried to define the callback via any of the following:
set_default_passwd_cb CTX_set_default_passwd_cb $IO::Socket::SSL::SSL::GLOBAL_CONTEXT_ARGS{'SSL_passwd_cb'} &IO::Socket::SSL::context_init('SSL_passwd_cb' => \&foo );
The LWP::UserAgent either asks via the TTY for the passphrase or barges ahead not asking for one but not succeeding in making the connection. Anybody ever managed to use this feature?

Comment on LWP::UserAgent and Passphrase protected Certificates
Download Code
Re: LWP::UserAgent and Passphrase protected Certificates
by tphyahoo (Vicar) on Aug 25, 2005 at 18:21 UTC
    I don't know if this will work or not, but you might want to try this with WWW::Mechanize (a subclass of LWP::UserAgent). Mechanize has a lot of features that make a variety of things easier, maybe it'll help with your problem.

    Also, when you google around for solutions, you might want to search on mechanize as well as UserAgent, because a lot of LWPers use the fancier mechanize module.

Re: LWP::UserAgent and Passphrase protected Certificates
by PodMaster (Abbot) on Aug 25, 2005 at 22:43 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://486661]
Approved by sgifford
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2014-09-02 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls