diff options
author | Ondřej Nový <novy@ondrej.org> | 2018-03-01 14:09:37 +0100 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-03-01 08:09:37 -0500 |
commit | 993c4e4afc4274019bdb835b64191afeed6c13b7 (patch) | |
tree | 5e7dfd9c0c236442c75bddc2ea85dbceb7a52861 /src/OpenSSL/SSL.py | |
parent | d072cae3a4e0d41602ffd0730a838fa12657ed4a (diff) | |
download | pyopenssl-git-993c4e4afc4274019bdb835b64191afeed6c13b7.tar.gz |
Don't add not supported SSL_ST_* into _all_, fixies #738 (#739)
Without this patch this fails:
>>> from OpenSSL.SSL import *
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/cryptography/utils.py", line 124, in __getattr__
obj = getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Diffstat (limited to 'src/OpenSSL/SSL.py')
-rw-r--r-- | src/OpenSSL/SSL.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index 5def0aa..b5dd442 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -87,10 +87,6 @@ __all__ = [ 'SSL_ST_CONNECT', 'SSL_ST_ACCEPT', 'SSL_ST_MASK', - 'SSL_ST_INIT', - 'SSL_ST_BEFORE', - 'SSL_ST_OK', - 'SSL_ST_RENEGOTIATE', 'SSL_CB_LOOP', 'SSL_CB_EXIT', 'SSL_CB_READ', @@ -206,6 +202,12 @@ if _lib.Cryptography_HAS_SSL_ST: SSL_ST_BEFORE = _lib.SSL_ST_BEFORE SSL_ST_OK = _lib.SSL_ST_OK SSL_ST_RENEGOTIATE = _lib.SSL_ST_RENEGOTIATE + __all__.extend([ + 'SSL_ST_INIT', + 'SSL_ST_BEFORE', + 'SSL_ST_OK', + 'SSL_ST_RENEGOTIATE', + ]) SSL_CB_LOOP = _lib.SSL_CB_LOOP SSL_CB_EXIT = _lib.SSL_CB_EXIT |