diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-23 17:21:00 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-23 17:21:00 -0600 |
commit | 90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8 (patch) | |
tree | 25336e21264053b89aa445c0477df93c04eb0b9c /cryptography | |
parent | b8564e829306731f5133ac6bcbfc8e2f7e1a25f4 (diff) | |
download | cryptography-90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8.tar.gz cryptography-90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8.tar.bz2 cryptography-90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8.zip |
add hmac_supported method to backend.
Previously we were implicitly assuming that if a hash was supported then
its hmac equivalent was as well.
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/hazmat/backends/openssl/backend.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py index f11ddf22..7b67fb0b 100644 --- a/cryptography/hazmat/backends/openssl/backend.py +++ b/cryptography/hazmat/backends/openssl/backend.py @@ -184,6 +184,9 @@ class Backend(object): digest = self.lib.EVP_get_digestbyname(algorithm.name.encode("ascii")) return digest != self.ffi.NULL + def hmac_supported(self, algorithm): + return self.hash_supported(algorithm) + def create_hash_ctx(self, algorithm): return _HashContext(self, algorithm) |