summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-11-16 22:42:15 -0500
committerNick Mathewson <nickm@torproject.org>2020-11-16 22:42:15 -0500
commitfcae26adf710cf1fe393fde723e9a2caf6012b09 (patch)
treec22edb2cb2f4399966c531fe947c4ff45d108f0d /src
parent862c44e4ec4db4fba19468558c2e2a3c1ecbbb7a (diff)
parent31a6a101a0c4cbe739a55069bf29a0f0615e5aa8 (diff)
downloadtor-fcae26adf710cf1fe393fde723e9a2caf6012b09.tar.gz
tor-fcae26adf710cf1fe393fde723e9a2caf6012b09.zip
Merge remote-tracking branch 'tor-gitlab/mr/195' into maint-0.3.5
Diffstat (limited to 'src')
-rw-r--r--src/test/hs_ntor_ref.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/hs_ntor_ref.py b/src/test/hs_ntor_ref.py
index 1b9772a5d6..d58ac3ca23 100644
--- a/src/test/hs_ntor_ref.py
+++ b/src/test/hs_ntor_ref.py
@@ -65,14 +65,16 @@ except ImportError:
try:
# Pull the sha3 functions in.
from hashlib import sha3_256, shake_256
- shake_squeeze = shake_256.digest
+ def shake_squeeze(obj, n):
+ return obj.digest(n)
except ImportError:
if hasattr(sha3, "SHA3256"):
# If this happens, then we have the old "sha3" module which
# hashlib and pysha3 superseded.
sha3_256 = sha3.SHA3256
shake_256 = sha3.SHAKE256
- shake_squeeze = shake_256.squeeze
+ def shake_squeeze(obj, n):
+ return obj.squeeze(n)
else:
# error code 77 tells automake to skip this test
sys.exit(77)