diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-22 14:31:52 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-22 14:31:52 -0800 |
commit | 3edffe25ab91702842a7553b028d50086c58eef1 (patch) | |
tree | b26e9cdfc2026dae5a14a10da0055e6628f23a27 /cryptography | |
parent | d203710bba3f2eb15a2e2db38a20305540af2eea (diff) | |
download | cryptography-3edffe25ab91702842a7553b028d50086c58eef1.tar.gz cryptography-3edffe25ab91702842a7553b028d50086c58eef1.tar.bz2 cryptography-3edffe25ab91702842a7553b028d50086c58eef1.zip |
include the error message
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/hazmat/bindings/openssl/backend.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py index 99f11f45..ae951717 100644 --- a/cryptography/hazmat/bindings/openssl/backend.py +++ b/cryptography/hazmat/bindings/openssl/backend.py @@ -207,8 +207,11 @@ class Backend(object): elif func == self.lib.EVP_F_EVP_DECRYPTFINAL_EX: if reason == self.lib.EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: raise IncorrectPadding + + message = self.ffi.string(self.lib.ERR_reason_error_string(code)) raise SystemError( - "Unknown error code from OpenSSL, you should probably file a bug" + "Unknown error code from OpenSSL, you should probably file a bug. " + "Cause: %s" % message ) |