diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2018-07-08 21:20:43 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-07-09 06:50:43 +0530 |
commit | dd6f4c2977ff03ba0e45e3528f49f126f587f123 (patch) | |
tree | 13603625f72073575f86560830da7a763dfda16b /src | |
parent | efad55978bd836380e423faa03503c0f537da3c4 (diff) | |
download | cryptography-dd6f4c2977ff03ba0e45e3528f49f126f587f123.tar.gz cryptography-dd6f4c2977ff03ba0e45e3528f49f126f587f123.tar.bz2 cryptography-dd6f4c2977ff03ba0e45e3528f49f126f587f123.zip |
Convert a pair of asserts to use openssl_assert (#4318)
We have an existence proof that the latter assertion can be triggered, and I bet the former can too.
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/rsa.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/rsa.py b/src/cryptography/hazmat/backends/openssl/rsa.py index 1b6ebfd7..e7a77312 100644 --- a/src/cryptography/hazmat/backends/openssl/rsa.py +++ b/src/cryptography/hazmat/backends/openssl/rsa.py @@ -129,7 +129,7 @@ def _enc_dec_rsa_pkey_ctx(backend, key, data, padding_enum, padding): def _handle_rsa_enc_dec_error(backend, key): errors = backend._consume_errors() - assert errors + backend.openssl_assert(errors) assert errors[0].lib == backend._lib.ERR_LIB_RSA if isinstance(key, _RSAPublicKey): assert (errors[0].reason == @@ -265,7 +265,7 @@ def _rsa_sig_verify(backend, padding, algorithm, public_key, signature, data): backend.openssl_assert(res >= 0) if res == 0: errors = backend._consume_errors() - assert errors + backend.openssl_assert(errors) raise InvalidSignature |