Skip to content

Commit

Permalink
Don't add not supported SSL_ST_* into _all_, fixies #738 (#739)
Browse files Browse the repository at this point in the history
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'
  • Loading branch information
onovy authored and alex committed Mar 1, 2018
1 parent d072cae commit 993c4e4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/OpenSSL/SSL.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@
'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',
Expand Down Expand Up @@ -206,6 +202,12 @@ class _buffer(object):
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
Expand Down

0 comments on commit 993c4e4

Please sign in to comment.