SSL connection issue with Windows CPython

B

Blairo

Hi all,

I've written a Python API for the Windows Azure Service Management web-
service. Requests against the web-service are HTTPS with a client
certificate used for authentication. This works fine with CPython
(tested with 2.6 and 2.7) on Linux, but something is amiss with the
SSL connection with vanilla python.org CPython (again 2.6 and 2.7) on
Windows. I've managed to boil it down to a simple test case, which
should return a list of Azure data-centre locations (requires an Azure
account):
--------------------
Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit
(AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
s.read(2048)
File "C:\Python27\lib\ssl.py", line 138, in read
return self._sslobj.read(len)
error: [Errno 10054] An existing connection was forcibly closed by the
remote host
--------------------

What's interesting is that the exact same code works with ActivePython
(2.6 and 2.7), output omitted here for brevity. There is more detail
on a (currently unanswered) stackoverflow post:
http://stackoverflow.com/questions/...azure-service-management-api-fails-on-windows
..

I'm not sure where/what the difference is. My best guess so far is
that ActivePython bundles a newer version of OpenSSL then the
python.org version and that the problem must be there. Any further
insight would be appreciated.

TIA,
~Blair
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top