Https://api.dreamhost.com hangs


#1

Something seems to be amiss with the certificate of api.dreamhost.com. When I connect using macports Python (2.7 or 3.3), it hangs in do_handshake() [1]. I get the same hang with Python 2.7 on my Synology NAS (DSM 4.3). wget ‘https://api.dreamhost.com’ gives certificate-related errors [2].

I can successfully connect to ‘https://www.google.com’ or ‘https://www.amazon.com’. Also, OS X’s built-in python has no such problems. So there seems to be differing opinions on the validity of the certificates. Can “api.dreamhost.com”'s certificate be fixed?

Thanks,
Yotam

PS Using “tlslite” instead of python’s built-in ssl module works, but I’d really like to avoid installing an external module.

[1] $ python

import urllib
urllib.urlopen( ‘https://api.dreamhost.com’ ).readlines()
^CTraceback (most recent call last):
File “”, line 1, in
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py”, line 87, in urlopen
return opener.open(url)
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py”, line 208, in open
return getattr(self, name)(url)
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py”, line 437, in open_https
h.endheaders(data)
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 969, in endheaders
self._send_output(message_body)
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 829, in _send_output
self.send(msg)
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 791, in send
self.connect()
File “/opt/local/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 “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py”, line 387, in wrap_socket
ciphers=ciphers)
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py”, line 143, in init
self.do_handshake()
File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py”, line 305, in do_handshake
self._sslobj.do_handshake()
KeyboardInterrupt

[2] $ wget ‘https://api.dreamhost.com
–2013-09-15 15:31:58-- https://api.dreamhost.com/
Resolving api.dreamhost.com (api.dreamhost.com)… 75.119.208.14
Connecting to api.dreamhost.com (api.dreamhost.com)|75.119.208.14|:443… connected.
ERROR: The certificate of ‘api.dreamhost.com’ is not trusted.
ERROR: The certificate of ‘api.dreamhost.com’ hasn’t got a known issuer.