aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Jenvey <pjenvey@underboss.org>2014-10-17 13:09:50 -0700
committerPhilip Jenvey <pjenvey@underboss.org>2014-10-17 13:09:50 -0700
commit624db11f534a5a9205272305146ec84eaa62139c (patch)
treeacd8dc18b18388b71fa0c0c48722ee90127f9b53
parentadjust per the new pypy3 exe name (diff)
downloadpypy-624db11f534a5a9205272305146ec84eaa62139c.tar.gz
pypy-624db11f534a5a9205272305146ec84eaa62139c.tar.bz2
pypy-624db11f534a5a9205272305146ec84eaa62139c.zip
fix _SSLContext invalid protocol errors not ensuring a self.ctx, leading to apypy3-release-2.4.0
potential crash in its destructor (grafted from c1ddf2d919a18fa4ebec03ce84e1a0457f4396ad)
-rw-r--r--pypy/module/_ssl/interp_ssl.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py
index af83dea969..0cac165ba3 100644
--- a/pypy/module/_ssl/interp_ssl.py
+++ b/pypy/module/_ssl/interp_ssl.py
@@ -90,6 +90,8 @@ def ssl_error(space, msg, errno=0):
class SSLContext(W_Root):
+ ctx = lltype.nullptr(SSL_CTX.TO)
+
def __init__(self, space, protocol):
if protocol == PY_SSL_VERSION_TLS1:
method = libssl_TLSv1_method()