aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptography/hazmat/backends/openssl/backend.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py
index 3d08e3f8..a2e06946 100644
--- a/cryptography/hazmat/backends/openssl/backend.py
+++ b/cryptography/hazmat/backends/openssl/backend.py
@@ -891,7 +891,8 @@ class _RSAVerificationContext(object):
self._backend._lib.RSA_NO_PADDING
)
if res != pkey_size:
- assert self._backend._consume_errors()
+ errors = self._backend._consume_errors()
+ assert errors
raise InvalidSignature
data_to_verify = self._hash_ctx.finalize()
@@ -904,7 +905,8 @@ class _RSAVerificationContext(object):
self._get_salt_length()
)
if res != 1:
- assert self._backend._consume_errors()
+ errors = self._backend._consume_errors()
+ assert errors
raise InvalidSignature
def _get_salt_length(self):