472,958 Members | 2,372 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 3979
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.