473,324 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

HTTPSConnection Problems

Hello. I'm having a bit of a problem with the HTTPSConnection class.
It is part of the httplib module. I discovered that it is not
neccessary to specifiy a key and a certificate when opening an HTTPS
connection. I tested this with several sites, and successfully opened
https connections with them. However, I'm having problems with the
server I'm trying to connect to. It is a Novell Bordermanager server
that tunnels all Internet traffic here at my college. When first
accessing the web through mozilla, the Bordermanager server doesn't
see you as being authenticated, so it redirects you to a web login
page. Utlimately what I would like to do is have my python script
submit the CGI form with my username and password so I don't have to
type this in everytime. However, I'm having problems using the
HTTPSConnection class to connect to it. If I don't give it a key and
cert file i get the following error: socket.error: (104, 'Connection
reset by peer')....so it appears the sever doesn't want me to
connect. I did a port scan on the server to ensure that it was using
the default https port, and it is. What I don't understand is why the
HTTPSConnection is asking for a private key. The private key resides
on the server; clients do not have access to this. Clients use the
public key to decrypt the certificate. I tried creating a public key
file by looking at it in the certificate properties in mozilla, but
python still complians that it wants a private key. I do not have
access to the key. I do have the certificate, which i saved using IE
and used openssl to convert it to a PEM formated file (this is what
HTTPSConnection says it needs). Can anyone offer any help here?
Jul 18 '05 #1
2 4000
According to John Glista <js*****@hotmail.com>:
However, I'm having problems with the
server I'm trying to connect to. It is a Novell Bordermanager server
that tunnels all Internet traffic here at my college. When first
accessing the web through mozilla, the Bordermanager server doesn't
see you as being authenticated, so it redirects you to a web login
page.
Ho ho, a clone of the idiotic Cisco cut-thru proxy.
Utlimately what I would like to do is have my python script
submit the CGI form with my username and password so I don't have to
type this in everytime. However, I'm having problems using the
HTTPSConnection class to connect to it. If I don't give it a key and
cert file i get the following error: socket.error: (104, 'Connection
reset by peer')....so it appears the sever doesn't want me to
connect. I did a port scan on the server to ensure that it was using
the default https port, and it is.
Who is the 'peer' here? It may be your Bordermanager proxy.

This is my guess: the Bordermanager sends an "authentication required"
response to your program and httplib is thus asking you for the cert and
key. Read the source, use a desktop proxy, etc. to determine if this is
indeed so.
What I don't understand is why the
HTTPSConnection is asking for a private key. The private key resides
on the server; clients do not have access to this.


You're talking about the server's key and certificate. There are also
*client* keys and certificates: A server may demand a client produces a
certificate and demonstrates possession of the corresponding private key as
a means of authentication and authorisation.

My ZServerSSL, e.g., accepts client certificates in lieu of passwords for
authentication.
--
Ng Pheng Siong <ng**@netmemetic.com>

http://firewall.rulemaker.net -+- Firewall Change Management & Version Control
http://sandbox.rulemaker.net/ngps -+- Open Source Python Crypto & SSL
Jul 18 '05 #2
ng**@netmemetic.com (Ng Pheng Siong) writes:
According to John Glista <js*****@hotmail.com>:

[...]
What I don't understand is why the
HTTPSConnection is asking for a private key. The private key resides
on the server; clients do not have access to this.


You're talking about the server's key and certificate. There are also
*client* keys and certificates: A server may demand a client produces a
certificate and demonstrates possession of the corresponding private key as
a means of authentication and authorisation.

[...]

That's exactly what the key and cert are for in httplib. There is no
support for server auth.

I got this backwards too, until Martin v. Loewis set me straight.
John
Jul 18 '05 #3

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

Similar topics

0
by: Terry Kerr | last post by:
Hi, I have an app that makes a https POST to a remote server that I have no control over. The app runs fine in python 2.1.3 with socket.ssl compiled with openssl-0.9.6, however it will not run...
4
by: Marc Poulhiès | last post by:
Hi, I'm trying to build a system using HTTPS with python clients that have to verify the server's identity. From the Python document, it seems that the server's certificate is not veryfied, and...
6
by: Paul Winkler | last post by:
This is driving me up the wall... any help would be MUCH appreciated. I have a module that I've whittled down into a 65-line script in an attempt to isolate the cause of the problem. (Real...
0
by: Huzaifa Tapal | last post by:
is it reccommended to us the HTTPSConnection object to make socket connections in a multithreaded persistent environment? The reason I ask is that I am having intermittent problems with possibly...
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
0
by: michaelparkin | last post by:
Hi, I'm using httplib to create a mutually authenticated HTTPS connection with a server. I create the connection as follows: c = httplib.HTTPSConnection(uri, key_file = key, cert_file =...
5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID = PROBLEMS.PROBLEM_ID WHERE INTEGER(DAYS(CURRENT DATE) -...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.