diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-10-24 19:10:14 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-10-24 19:10:52 -0500 |
commit | d2146ec71afd482073b7b0117184a8689b408b83 (patch) | |
tree | 83751fafe2e22233cd34e0e99367a7dbda534e58 | |
parent | 9837cb15b84fea92ffce3306d14160a8c11b1c65 (diff) | |
download | cryptography-d2146ec71afd482073b7b0117184a8689b408b83.tar.gz cryptography-d2146ec71afd482073b7b0117184a8689b408b83.tar.bz2 cryptography-d2146ec71afd482073b7b0117184a8689b408b83.zip |
address review comments
-rw-r--r-- | src/cryptography/hazmat/bindings/openssl/binding.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cryptography/hazmat/bindings/openssl/binding.py b/src/cryptography/hazmat/bindings/openssl/binding.py index f8bf3116..4fac11d8 100644 --- a/src/cryptography/hazmat/bindings/openssl/binding.py +++ b/src/cryptography/hazmat/bindings/openssl/binding.py @@ -97,7 +97,6 @@ class Binding(object): @classmethod def _register_osrandom_engine(cls): _openssl_assert(cls.lib, cls.lib.ERR_peek_error() == 0) - cls.lib.ERR_clear_error() engine = cls.lib.ENGINE_new() _openssl_assert(cls.lib, engine != cls.ffi.NULL) @@ -111,7 +110,8 @@ class Binding(object): result = cls.lib.ENGINE_add(engine) if result != 1: errors = _consume_errors(cls.lib) - assert ( + _openssl_assert( + cls.lib, errors[0].reason == cls.lib.ENGINE_R_CONFLICTING_ENGINE_ID ) @@ -172,6 +172,3 @@ class Binding(object): mode, n, file, line ) ) - -# init the static locks so we have a locking callback in C for engine init -Binding.init_static_locks() |