aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-10-23 07:51:52 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-10-23 07:51:52 -0700
commitc7233f1fb1c0fc4e9afadc6af143125841442618 (patch)
tree8b5d3c934c085c50fa877388b05578daa2a4a851
parent40ebc39944af3b0fea29454f68327a9c56fcf2f1 (diff)
parent218f7fbdc6ec3fbc43f6dd112d8e5a6645ffa0e1 (diff)
downloadcryptography-c7233f1fb1c0fc4e9afadc6af143125841442618.tar.gz
cryptography-c7233f1fb1c0fc4e9afadc6af143125841442618.tar.bz2
cryptography-c7233f1fb1c0fc4e9afadc6af143125841442618.zip
Merge pull request #1430 from alex/its-a-mac
Fixed #1429 -- mark these classes as implementing the MACContext interface
-rw-r--r--cryptography/hazmat/backends/commoncrypto/hmac.py1
-rw-r--r--cryptography/hazmat/backends/openssl/hmac.py1
2 files changed, 2 insertions, 0 deletions
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):