aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-07-25 20:04:11 +0100
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-07-25 20:04:11 +0100
commitaf57f7d2ce0b77a3e58a40d85b772ddd949f8e89 (patch)
tree28a69c2ed47540306dc61244a816e36f7bca4984 /src
parent6a71f8d9972032c5f034ba47bcf3439c9ffd3494 (diff)
downloadcryptography-af57f7d2ce0b77a3e58a40d85b772ddd949f8e89.tar.gz
cryptography-af57f7d2ce0b77a3e58a40d85b772ddd949f8e89.tar.bz2
cryptography-af57f7d2ce0b77a3e58a40d85b772ddd949f8e89.zip
openssl error codes are clearly not considered part of the api contract
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/backends/openssl/backend.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py
index 76252404..db4f963a 100644
--- a/src/cryptography/hazmat/backends/openssl/backend.py
+++ b/src/cryptography/hazmat/backends/openssl/backend.py
@@ -1057,11 +1057,8 @@ class Backend(object):
)
if res == 0:
errors = self._consume_errors()
- assert errors[0][1:] == (
- self._lib.ERR_LIB_RSA,
- self._lib.RSA_F_RSA_SIGN,
- self._lib.RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY
- )
+ assert errors[0][1] == self._lib.ERR_LIB_RSA
+ assert errors[0][3] == self._lib.RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY
raise ValueError("Digest too big for RSA key")
return _CertificateSigningRequest(self, x509_req)