We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a608ff8 commit f818619Copy full SHA for f818619
2 files changed
Lib/hmac.py
@@ -129,7 +129,10 @@ def copy(self):
129
other.digest_size = self.digest_size
130
if self._hmac:
131
other._hmac = self._hmac.copy()
132
- other._inner = other._outer = None
+ if hasattr(self, '_inner'):
133
+ del other._inner
134
+ if hasattr(other, '_outer'):
135
+ del other._outer
136
else:
137
other._hmac = None
138
other._inner = self._inner.copy()
Lib/test/test_hmac.py
@@ -990,7 +990,7 @@ def test_realcopy(self):
990
class OpenSSLCopyTestCase(ExtensionCopyTestCase, unittest.TestCase):
991
992
def init(self, h):
993
- h._init_openssl_hmac(b"key", b"msg", digestmod="sha256")
+ h._init_hmac(b"key", b"msg", digestmod="sha256")
994
995
996
class CompareDigestMixin:
0 commit comments