diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-22 16:24:06 -0800 | 
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-22 16:24:06 -0800 | 
| commit | e247d0be584c52e25694918ad2345dadde3fefa9 (patch) | |
| tree | 4de14a0fefd1e1f783b9c2d0b00823089ebf722d /cryptography | |
| parent | 3edffe25ab91702842a7553b028d50086c58eef1 (diff) | |
| download | cryptography-e247d0be584c52e25694918ad2345dadde3fefa9.tar.gz cryptography-e247d0be584c52e25694918ad2345dadde3fefa9.tar.bz2 cryptography-e247d0be584c52e25694918ad2345dadde3fefa9.zip | |
Coverage
Diffstat (limited to 'cryptography')
| -rw-r--r-- | cryptography/hazmat/bindings/openssl/backend.py | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py index ae951717..77ecf277 100644 --- a/cryptography/hazmat/bindings/openssl/backend.py +++ b/cryptography/hazmat/bindings/openssl/backend.py @@ -199,7 +199,9 @@ class Backend(object):          lib = self.lib.ERR_GET_LIB(code)          func = self.lib.ERR_GET_FUNC(code)          reason = self.lib.ERR_GET_REASON(code) +        return self._handle_error_code(lib, func, reason) +    def _handle_error_code(self, lib, func, reason):          if lib == self.lib.ERR_LIB_EVP:              if func == self.lib.EVP_F_EVP_ENCRYPTFINAL_EX:                  if reason == self.lib.EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH: @@ -208,10 +210,8 @@ class Backend(object):                  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. " -            "Cause: %s" % message +            "Unknown error code from OpenSSL, you should probably file a bug."          ) | 
