diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-07-25 20:04:11 +0100 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-07-25 20:04:11 +0100 |
commit | af57f7d2ce0b77a3e58a40d85b772ddd949f8e89 (patch) | |
tree | 28a69c2ed47540306dc61244a816e36f7bca4984 | |
parent | 6a71f8d9972032c5f034ba47bcf3439c9ffd3494 (diff) | |
download | cryptography-af57f7d2ce0b77a3e58a40d85b772ddd949f8e89.tar.gz cryptography-af57f7d2ce0b77a3e58a40d85b772ddd949f8e89.tar.bz2 cryptography-af57f7d2ce0b77a3e58a40d85b772ddd949f8e89.zip |
openssl error codes are clearly not considered part of the api contract
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 7 |
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) |