diff options
author | Alex Chan <alex@alexwlchan.net> | 2016-11-18 13:53:39 +0000 |
---|---|---|
committer | Hynek Schlawack <hs@ox.cx> | 2016-11-18 14:53:39 +0100 |
commit | c60770699be48e9c3f3b4f542c8a4118be2936ab (patch) | |
tree | 9231d6ea9232d3eaeeb8db170d62b5ac2ad4d371 /src | |
parent | ec1e32d37cfc6c7be469a4b7c1c28448312362c2 (diff) | |
download | pyopenssl-c60770699be48e9c3f3b4f542c8a4118be2936ab.tar.gz |
Convert X509ExtTests to use pytest-style tests (#564)
Diffstat (limited to 'src')
-rw-r--r-- | src/OpenSSL/SSL.py | 1 | ||||
-rw-r--r-- | src/OpenSSL/crypto.py | 3 | ||||
-rw-r--r-- | src/OpenSSL/rand.py | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index 7ebf7e0..f92c064 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -1065,6 +1065,7 @@ class Context(object): _lib.SSL_CTX_set_alpn_select_cb( self._context, self._alpn_select_callback, _ffi.NULL) + ContextType = Context diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index 52fcdaf..e1558ed 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -316,6 +316,8 @@ class PKey(object): :return: The number of bits of the key. """ return _lib.EVP_PKEY_bits(self._pkey) + + PKeyType = PKey @@ -2180,6 +2182,7 @@ class PKCS7(object): string_type = _lib.OBJ_nid2sn(nid) return _ffi.string(string_type) + PKCS7Type = PKCS7 diff --git a/src/OpenSSL/rand.py b/src/OpenSSL/rand.py index a22f9e5..8f51ad8 100644 --- a/src/OpenSSL/rand.py +++ b/src/OpenSSL/rand.py @@ -31,6 +31,7 @@ class Error(Exception): See :manpage:`err(3)` for more information. """ + _raise_current_error = partial(_exception_from_error_queue, Error) _unspecified = object() @@ -202,6 +203,7 @@ def screen(): """ _lib.RAND_screen() + if getattr(_lib, 'RAND_screen', None) is None: del screen |