From 218f7fbdc6ec3fbc43f6dd112d8e5a6645ffa0e1 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 22 Oct 2014 11:15:08 -0700 Subject: Fixed #1429 -- mark these classes as implementing the MACContext interface --- cryptography/hazmat/backends/commoncrypto/hmac.py | 1 + cryptography/hazmat/backends/openssl/hmac.py | 1 + 2 files changed, 2 insertions(+) diff --git a/cryptography/hazmat/backends/commoncrypto/hmac.py b/cryptography/hazmat/backends/commoncrypto/hmac.py index ec3a878b..c6e3f276 100644 --- a/cryptography/hazmat/backends/commoncrypto/hmac.py +++ b/cryptography/hazmat/backends/commoncrypto/hmac.py @@ -18,6 +18,7 @@ from cryptography.exceptions import UnsupportedAlgorithm, _Reasons from cryptography.hazmat.primitives import interfaces +@utils.register_interface(interfaces.MACContext) @utils.register_interface(interfaces.HashContext) class _HMACContext(object): def __init__(self, backend, key, algorithm, ctx=None): diff --git a/cryptography/hazmat/backends/openssl/hmac.py b/cryptography/hazmat/backends/openssl/hmac.py index 3f1576f5..ca62184b 100644 --- a/cryptography/hazmat/backends/openssl/hmac.py +++ b/cryptography/hazmat/backends/openssl/hmac.py @@ -19,6 +19,7 @@ from cryptography.exceptions import UnsupportedAlgorithm, _Reasons from cryptography.hazmat.primitives import interfaces +@utils.register_interface(interfaces.MACContext) @utils.register_interface(interfaces.HashContext) class _HMACContext(object): def __init__(self, backend, key, algorithm, ctx=None): -- cgit v1.2.3