aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography/hazmat/bindings/openssl/backend.py
diff options
context:
space:
mode:
Diffstat (limited to 'cryptography/hazmat/bindings/openssl/backend.py')
-rw-r--r--cryptography/hazmat/bindings/openssl/backend.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py
index 77ecf277..b2599d22 100644
--- a/cryptography/hazmat/bindings/openssl/backend.py
+++ b/cryptography/hazmat/bindings/openssl/backend.py
@@ -19,7 +19,7 @@ import sys
import cffi
from cryptography import utils
-from cryptography.exceptions import UnsupportedAlgorithm, IncorrectPadding
+from cryptography.exceptions import UnsupportedAlgorithm
from cryptography.hazmat.bindings.interfaces import (
CipherBackend, HashBackend, HMACBackend
)
@@ -205,10 +205,10 @@ class Backend(object):
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:
- raise IncorrectPadding
+ raise ValueError
elif func == self.lib.EVP_F_EVP_DECRYPTFINAL_EX:
if reason == self.lib.EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH:
- raise IncorrectPadding
+ raise ValueError
raise SystemError(
"Unknown error code from OpenSSL, you should probably file a bug."