Help with LWP, Crypt::SSLeay to do HTTPS

Help with LWP, Crypt::SSLeay to do HTTPS

am 23.05.2005 23:52:46 von IGunawan635

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

Hi, libwww@perl.org,

=20

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:

=20

libwww-perl 5.64

Crypt-SSLeay 0.51

=20

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:

=20

https://val.banking.worldsavings.com/wsb/WDSHeartBeat?heartb eat=3DPWS
=20

and the URL send its CA certificate.

=20

Below are my codes:

=20

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 ';

=20

# PROXY_BASIC_AUTH

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

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

=20

# DEBUGGING SWITCH / LOW LEVEL SSL DIAGNOSTICS=20

$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/';

=20

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

$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";

}

=20

The output:

=20

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

=20



....

=20

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.

=20

Any input on this is greatly appreciated.

=20

Thanks.

-Indra

=20

=20

Indra Gunawan

Corporate Internet Group

(510) 297-7991

IGunawan635@worldsavings.com

=20



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


------_=_NextPart_001_01C55FE1.C1F778DA--