diff options
Diffstat (limited to 'src/cryptography/hazmat/backends/openssl/hashes.py')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/hashes.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/hashes.py b/src/cryptography/hazmat/backends/openssl/hashes.py index 92ea53bb..c39f57dc 100644 --- a/src/cryptography/hazmat/backends/openssl/hashes.py +++ b/src/cryptography/hazmat/backends/openssl/hashes.py @@ -22,12 +22,11 @@ class _HashContext(object): ctx = self._backend._ffi.gc( ctx, self._backend._lib.Cryptography_EVP_MD_CTX_free ) - name = self._backend._build_openssl_digest_name(algorithm) - evp_md = self._backend._lib.EVP_get_digestbyname(name) + evp_md = self._backend._evp_md_from_algorithm(algorithm) if evp_md == self._backend._ffi.NULL: raise UnsupportedAlgorithm( "{0} is not a supported hash on this backend.".format( - name), + algorithm.name), _Reasons.UNSUPPORTED_HASH ) res = self._backend._lib.EVP_DigestInit_ex(ctx, evp_md, |