Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'received:169.254.1': 0.05; 'attribute': 0.07; 'socket': 0.07; '__init__': 0.09; 'ioerror:': 0.16; 'self.sock': 0.16; 'simplest': 0.16; 'skip:" 70': 0.16; 'subject:SSL': 0.16; 'urllib': 0.16; 'trying': 0.19; 'machine': 0.22; '>>>': 0.22; 'import': 0.22; 'reset': 0.22; 'to:name:python- list@python.org': 0.22; 'ssl': 0.24; 'subject:problem': 0.24; 'idea': 0.28; '"",': 0.31; 'anyone': 0.31; 'file': 0.32; 'received:169.254': 0.32; 'open': 0.33; '(most': 0.33; 'problem': 0.35; 'connection': 0.35; 'skip:s 30': 0.35; 'doing': 0.36; 'received:169': 0.37; 'url:microsoft': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'charset:windows-1252': 0.65; 'received:130': 0.73; 'curl': 0.84; 'i\x92ve': 0.84 X-IronPort-AV: E=Sophos;i="5.04,619,1406584800"; d="scan'208";a="41082141" X-IPAS-Result: AqoGAHshKVSC7wH3/2dsb2JhbABgEwEBg0zKb4hvAQFxCYQFBAGBCwGBACYBBIhJCAUImkWkfQEXk1OBHQWFFI1WgzWIa5N7g2U7LwGCSQEBAQ From: Roland Hedberg To: "python-list@python.org" Date: Mon, 29 Sep 2014 11:12:15 +0200 Subject: Weird SSL problem Thread-Topic: Weird SSL problem Thread-Index: Ac/bxXZbL25p0If7TH+y0y6x39ap+Q== Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, sv-SE Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 59 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1411982006 news.xs4all.nl 2876 [2001:888:2000:d::a6]:37535 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78455 Hi! I=92m trying to access=20 https://stsadweb.one.microsoft.com/adfs/.well-known/openid-configuration Doing it the simplest way I get the following: >>> import urllib >>> f =3D urllib.urlopen("https://stsadweb.one.microsoft.com/adfs/.well-kno= wn/openid-configuration") Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/url= lib.py", line 87, in urlopen return opener.open(url) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/url= lib.py", line 208, in open return getattr(self, name)(url) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/url= lib.py", line 437, in open_https h.endheaders(data) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/htt= plib.py", line 969, in endheaders self._send_output(message_body) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/htt= plib.py", line 829, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/htt= plib.py", line 791, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/htt= plib.py", line 1176, in connect self.sock =3D 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=3Dciphers) 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 =92OpenSSL 0.9.8za 5 Jun 2014' Now, using Safari, or curl for that matter, from the same machine works wit= hout a hitch. The URL above is also the only URL I=92ve encountered this problem with. Anyone got an idea ? =97 Roland =94Being able to think like a child is an important attribute of being an a= dult=94 - Eddie Izzard