aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-23 17:21:00 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-23 17:21:00 -0600
commit90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8 (patch)
tree25336e21264053b89aa445c0477df93c04eb0b9c /cryptography
parentb8564e829306731f5133ac6bcbfc8e2f7e1a25f4 (diff)
downloadcryptography-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.py3
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)