aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptography/hazmat/bindings/openssl/backend.py2
-rw-r--r--cryptography/hazmat/primitives/hmac.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py
index 60d51305..4d1be3b0 100644
--- a/cryptography/hazmat/bindings/openssl/backend.py
+++ b/cryptography/hazmat/bindings/openssl/backend.py
@@ -344,7 +344,7 @@ class _HMACContext(object):
copied_ctx, self._ctx
)
assert res != 0
- return self.__class__(
+ return _HMACContext(
self._backend, self._key, self.algorithm, ctx=copied_ctx
)
diff --git a/cryptography/hazmat/primitives/hmac.py b/cryptography/hazmat/primitives/hmac.py
index 27bc0fee..57a908c4 100644
--- a/cryptography/hazmat/primitives/hmac.py
+++ b/cryptography/hazmat/primitives/hmac.py
@@ -43,7 +43,7 @@ class HMAC(object):
self._ctx.update(msg)
def copy(self):
- return self.__class__(
+ return HMAC(
self._key, self.algorithm, ctx=self._ctx.copy(),
backend=self._backend
)