473,657 Members | 2,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTTPS SSLeay problems - any experts out there?

Hi. I'm having a bit of trouble using a Perl script that will login to
a secure website... and then access subsequent pages with a cookie.
This works when accessing manually via the browser (Konqueror) which
then accepts the cookie and allows me to login to subsequent pages
with the valid cookie. It appears that the HTTP/SSLeay installation
is working fine since no errors come up when I access "https://"
directives. I just haven't been able to get beyond logging in.

I have tried many things, but I haven't been able to get my perl
script to authenticate successfully. Everything works fine on
non-secure (http://) websites.

I did notice a "Client-SSL-Warning: Peer certificate not verified"
warning in the header that I get returned to me.

I have tried many things, but no success, am I missing something
obvious here?
I am running FreeBSD 4.8 with Perl 5.6.1 with the Crypt-SSLeay 0.51.

This is my script:

-----------------------------
#!/usr/local/bin/perl -w
use strict;
use Crypt::SSLeay;
use LWP::UserAgent;
use LWP::Simple;
use HTTP::Request:: Common qw(POST);
use HTTP::Cookies;

my $ua = LWP::UserAgent->new;
my $cookie_jar = HTTP::Cookies->new(file => "lwpcookies2.tx t",
autosave => 1);
$ua->cookie_jar( $cookie_jar);
$ua->agent('Mozil la/5.0');
my $url = 'https://www.sdmediagrou p.com/registration/';
my $req = POST $url, ['login' => 'me', 'password' => 'mypass'];
my $res = $ua->request($req );
$cookie_jar->extract_cookie s($res);

if ($res->is_success) {
# print out result to look at headers
print $res->as_string;

# access page with cookie secured after logged in
my $req = HTTP::Request->new(GET => 'http://www.ddj.com/');
$cookie_jar->add_cookie_hea der($req);
$res = $ua->request($req );
print $res->as_string;
} else {
print "Failed: ", $res->status_line, "\n";
}
----------------------------

The response I get from the login POST is this:
HTTP/1.1 200 OK
Cache-Control: private
Connection: close
Date: Tue, 29 Jun 2004 22:06:17 GMT
Server: Apache/1.3.28 (Unix) PHP/4.3.3 mod_ssl/2.8.15 OpenSSL/0.9.7a
Resin/2.1.10
Content-Length: 1132
Content-Type: text/html
Content-Type: text/html; charset=iso-8859-1
Client-Date: Tue, 29 Jun 2004 22:06:34 GMT
Client-Peer: 66.77.26.213:44 3
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=Equifax Secure Inc./CN=Equifax Secure
Global eBusines
s CA-1
Client-SSL-Cert-Subject:
/C=US/O=www.sdmediagr oup.com/OU=https://services.choice point
..net/get.jsp?2922628 099/OU=See www.geotrust.com/quickssl/cps
(c)04/OU=Domain Control
Validated/CN=www.sdmediag roup.com
Client-SSL-Cipher: DHE-RSA-AES256-SHA
Client-SSL-Warning: Peer certificate not verified
Set-Cookie: JSESSIONID=aQEj vqhLgLTd; path=/

..... html saying that an error has occured processing the request...
Subsequent page accesses don't work obviously because of invalid
cookie due to failed login.

Any help would be greatly appreciated! Thanks in advance.
Jul 19 '05 #1
0 4547

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4612
by: Josip Krapac | last post by:
Hello, I've got this situation: Servlet accessed by https (ie. https://host.domain/SecureServlet) starts a session (HttpSession session = req.getSession(true)), sets some session attributes and then redirects to servlet that is accessed by http (ie: http://host.domain/UnsecureServlet). Following problem occurs:
2
6071
by: Martin 'Kingpin' Thurn | last post by:
I'm running ActiveState perl build 806 on Win98. I want to GET an https page. So far I did this, which I found in another thread thanks to Google: c:> ppm ppm> rep add winnipeg http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58 ppm> install Crypt-SSLeay This downloaded 2 DLLs, libeay32.dll and ssleay32.dll, and put them in my
0
1183
by: DotNetJunkies User | last post by:
Hello everyone: Ok here is a very weird problem I am having and I hope that some of you can share some thoughts with me on this. First of all, let me start by listing what I have: 1.- Windows Server 2003 - Standard Edition 2.- IIS 6.0 I have 2 different web sites running on this box,
0
1238
by: vickeybird | last post by:
Hi, My current application requires me to use HTTPS and Cookieless Sessions. Ive just implemented HHTP Handler to redirect all http request to https as described by Matt Sollars at http://www.codeproject.com/aspnet/WebPageSecurity_v2.asp My problem is that the session expires after user logs in and clicks one ro two links. I changed session timeout in web.config to 40 minutes. Still the problem persists.
1
6579
by: Rory | last post by:
I'm just starting to use cURL and having trouble accessing https pages. All I want to do at this stage is get an https page and display it, just to test the https get is working. However, I always get either a CURLE_OPERATION_TIMEOUTED (28) or CURLE_COULDNT_CONNECT (7) error. I can see from phpinfo() that cURL and SSL are installed, as follows: CURL support enabled CURL Information libcurl/7.12.0 OpenSSL/0.9.6b zlib/1.1.4 but my code...
6
4264
by: chris | last post by:
Client page: <input type="file".....> Server: Apache, OC4J, J2EE app XP, SP1 and updates Works perfectly under HTTP. However, under HTTPS the user needs to hit the submit button really fast to avoid a "page cannot be displayed". All other interaction with the application works well.
3
1981
by: Calvin KD | last post by:
Does anyone knows of any issues/problems associated with sending xml file via https? I have a button which exports data records using DataSet.GetXML() method and sending it over the https and clients (outside the firewall) apparently having problems with obtaining the xml file. Following is a snippet of the actual code which generates the xml for export. HttpContext.Current.Response.ClearContent();...
1
5065
by: Balex | last post by:
Hi This is a question for people who know and use the winhttp DLL from MS. I need to be able to simulate the entry by users of data into a web-based application. So I started with using winhttp to "dialogue" with web servers from a VB.Net app. It works fine as long as the server is a straightforward http server. I am able to retrieve pages from such a server and to send "answers" to the server to get the next page, and so on. No problems....
3
2292
by: mbrunell | last post by:
Hi, On AIX, I have a script that checks URLs availability with the Lwp::UserAgent module. It has been checking HTTPS URLs without any problem, but since the OpenSSL and OpenSSH versions has been updated, I have an error message saying that HTTPS is not supported. I don't have the Crypt::SSLeay module or the IO::Socket::SSL module installed and it has always been working fine. I think that when Lwp::UserAgent had been installed, it had...
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.