summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-11-16 22:42:23 -0500
committerNick Mathewson <nickm@torproject.org>2020-11-16 22:42:23 -0500
commitc79957581e5d6c64fdae2be5b4d5a188ed18960a (patch)
tree4161518467a7be6c4fde298e5dbd28c9bee9791d /src/test
parentd425dbf04a6bbac7eae832bf51c2bfe061e2c426 (diff)
parent90017323942dc56b23d98c34894542e30856aeac (diff)
downloadtor-c79957581e5d6c64fdae2be5b4d5a188ed18960a.tar.gz
tor-c79957581e5d6c64fdae2be5b4d5a188ed18960a.zip
Merge branch 'maint-0.4.4' into master
Diffstat (limited to 'src/test')
-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 f107cc36ca..98025dd584 100644
--- a/src/test/hs_ntor_ref.py
+++ b/src/test/hs_ntor_ref.py
@@ -70,14 +70,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)