aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/backends/openssl/backend.py22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py
index 41b86d6b..7c53d863 100644
--- a/src/cryptography/hazmat/backends/openssl/backend.py
+++ b/src/cryptography/hazmat/backends/openssl/backend.py
@@ -1210,23 +1210,6 @@ class Backend(object):
_Reasons.UNSUPPORTED_CIPHER
)
- elif errors[0][1:] in (
- (
- self._lib.ERR_LIB_ASN1,
- self._lib.ASN1_F_ASN1_CHECK_TLEN,
- self._lib.ASN1_R_WRONG_TAG
- ),
- (
- self._lib.ERR_LIB_PEM,
- self._lib.PEM_F_PEM_READ_BIO,
- self._lib.PEM_R_NO_START_LINE
- ),
- ):
- raise UnsupportedAlgorithm(
- "Unsupported public key algorithm.",
- _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM
- )
-
elif any(
error[1:] == (
self._lib.ERR_LIB_EVP,
@@ -1235,10 +1218,7 @@ class Backend(object):
)
for error in errors
):
- raise UnsupportedAlgorithm(
- "Unsupported public key algorithm.",
- _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM
- )
+ raise ValueError("Unsupported public key algorithm.")
else:
assert errors[0][1] in (