Help with LWP, Crypt::SSLeay to do HTTPS

------_=_NextPart_001_01C55FE1.C1F778DA
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi, libwww [at] perl.org,



I've searching for answer to do a HTTPS request for work related task.
In the past 2 days, I've installed

the following modules on Perl 5.6.1 build 631 on Windows to ensure I am
working with the latest version:



libwww-perl 5.64

Crypt-SSLeay 0.51



I've tried to do GET & CONNECT and keep getting 407 Proxy
Authentication Required error. The HTTPS request is a GET to query the
status of a backend system on an Online Banking Websphere box using this

URL:



https://val.banking.worldsavings.com/wsb/WDSHeartBeat?heartb eat=3DPWS
<https://val.banking.****.com/wsb/WDSHeartBeat?heartbeat=3DPWS>

and the URL send its CA certificate.



Below are my codes:



use Crypt::SSLeay;

LWP::Debug::level('+conns');

LWP::Debug::level('+trace');

LWP::Debug::level('+debug');

# HTTPS Proxy Support

$ENV{HTTPS_PROXY} =3D 'http://sa1isa4:80 <http://sa1isa4/> ';



# PROXY_BASIC_AUTH

$ENV{HTTPS_PROXY_USERNAME} =3D 'myusername';

$ENV{HTTPS_PROXY_PASSWORD} =3D 'mypassword';



# DEBUGGING SWITCH / LOW LEVEL SSL DIAGNOSTICS

$ENV{HTTPS_DEBUG} =3D 1;

# DEFAULT SSL VERSION

$ENV{HTTPS_VERSION} =3D '3';

$ENV{HTTPS_CA_FILE} =3D 'val.banking.worldsavings.com.cer';

$ENV{HTTPS_CA_DIR} =3D 'C:/Perl/certs/';



my $browser =3D LWP::UserAgent->new();

$request =3D HTTP::Request-new (GET =3D>
'https://val.banking.****.com/wsb/WDSHeartBeat?heartbeat=3DP WS');

$response =3D $browser-request($request);

if ($response->is_success()) {

print $response->as_string;

} else {

print "Failed: ", $response->status_line, "\n";

}



The output:



LWP::UserAgent::new: ()

LWP::UserAgent::request: ()

LWP::UserAgent::send_request: CONNECT
https://val.banking.worldsavings.com/wsb/WDSHeartBeat?heartb eat=3DPWS

LWP::UserAgent::_need_proxy: Not proxied

LWP::Protocol::http::request: ()

LWP::UserAgent::request: Simple response: Internal Server Error

Failed: 500 proxy connect failed: PROXY ERROR HEADER, could be non-SSL
URL:

HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires
authorization to fulfill the request. Access to the Web Proxy service is
denied. )

Via:1.1 SA1ISA4

Proxy-Authenticate: NTLM

Proxy-Authenticate: Kerberos

Proxy-Authenticate: Negotiate

Pragma: no-cache

Cache-Control: no-cache

Content-Type: text/html

Content-Length: 2375



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

....



How do I pass beyond the 407 error and use Crypt::SSLeay to use the
certificate to pass to proxy server?

Using "CONNECT" instead of "GET" also returns the same error.



Any input on this is greatly appreciated.



Thanks.

-Indra





Indra Gunawan

Corporate Internet Group

(510) 297-7991

IGunawan635 [at] worldsavings.com





************************************************************ ***************=
**
If you are not the intended recipient of this e-mail, please notify
the sender immediately. The contents of this e-mail do not amend
any existing disclosures or agreements unless expressly stated.
************************************************************ ***************=
**


------_=_NextPart_001_01C55FE1.C1F778DA--
IGunawan635 [ Mo, 23 Mai 2005 23:52 ] [ ID #806078 ]
Perl » perl.libwww » Help with LWP, Crypt::SSLeay to do HTTPS

Vorheriges Thema: why doesn't getstore function well on freebsd?
Nächstes Thema: Swish-e and unknown header bug