From: Mark Guagenti Date: Fri, 13 Mar 2015 17:29:23 +0000 (-0500) Subject: GAE does not have the ssl module so we can't access ssl.CERT_REQUIRED X-Git-Tag: v4.2.0b1~65^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1379%2Fhead;p=thirdparty%2Ftornado.git GAE does not have the ssl module so we can't access ssl.CERT_REQUIRED --- diff --git a/tornado/netutil.py b/tornado/netutil.py index 3464255f0..3fde43412 100644 --- a/tornado/netutil.py +++ b/tornado/netutil.py @@ -79,11 +79,16 @@ if hasattr(ssl, 'SSLContext'): _client_ssl_defaults.options |= ssl.OP_NO_COMPRESSION _server_ssl_defaults.options |= ssl.OP_NO_COMPRESSION -else: +elif ssl: # Python 2.6-2.7.8 _client_ssl_defaults = dict(cert_reqs=ssl.CERT_REQUIRED, ca_certs=certifi.where()) _server_ssl_defaults = {} +else: + # Google App Engine + _client_ssl_defaults = dict(cert_reqs=None, + ca_certs=None) + _server_ssl_defaults = {} # ThreadedResolver runs getaddrinfo on a thread. If the hostname is unicode, # getaddrinfo attempts to import encodings.idna. If this is done at