Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78455 > unrolled thread

Weird SSL problem

Started byRoland Hedberg <roland.hedberg@adm.umu.se>
First post2014-09-29 11:12 +0200
Last post2014-09-29 11:12 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Weird SSL problem Roland Hedberg <roland.hedberg@adm.umu.se> - 2014-09-29 11:12 +0200

#78455 — Weird SSL problem

FromRoland Hedberg <roland.hedberg@adm.umu.se>
Date2014-09-29 11:12 +0200
SubjectWeird SSL problem
Message-ID<mailman.14463.1411982006.18130.python-list@python.org>
Hi!

I’m trying to access 
https://stsadweb.one.microsoft.com/adfs/.well-known/openid-configuration

Doing it the simplest way I get the following:

>>> import urllib
>>> f = urllib.urlopen("https://stsadweb.one.microsoft.com/adfs/.well-known/openid-configuration")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 87, in urlopen
    return opener.open(url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 208, in open
    return getattr(self, name)(url)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 437, in open_https
    h.endheaders(data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 969, in endheaders
    self._send_output(message_body)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 829, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 791, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1176, in connect
    self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 387, in wrap_socket
    ciphers=ciphers)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 143, in __init__
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 305, in do_handshake
    self._sslobj.do_handshake()
IOError: [Errno socket error] [Errno 54] Connection reset by peer
>>> import ssl
>>> ssl.OPENSSL_VERSION
’OpenSSL 0.9.8za 5 Jun 2014'

Now, using Safari, or curl for that matter, from the same machine works without a hitch.

The URL above is also the only URL I’ve encountered this problem with.

Anyone got an idea ?

— Roland

”Being able to think like a child is an important attribute of being an adult” - Eddie Izzard

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web