aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptography/hazmat/backends/openssl/backend.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py
index 44065b1c..6f024da5 100644
--- a/cryptography/hazmat/backends/openssl/backend.py
+++ b/cryptography/hazmat/backends/openssl/backend.py
@@ -779,8 +779,7 @@ class _RSAVerificationContext(object):
if not isinstance(padding._mgf, MGF1):
raise TypeError("Only MGF1 is supported by this backend")
- if (not isinstance(padding._mgf._algorithm, hashes.SHA1) and
- not self._backend._lib.Cryptography_HAS_MGF1_MD):
+ if not self._backend.mgf1_hash_supported(padding._mgf._algorithm):
raise UnsupportedHash("This backend only supports MGF1 with "
"SHA1 when OpenSSL is not 1.0.1+")