GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 90017323 authored by Nick Mathewson's avatar Nick Mathewson 🐙

Merge branch 'maint-0.4.3' into maint-0.4.4

parents 3f1544bb 7c0778ef
Pipeline #1701 passed with stage
in 52 minutes and 4 seconds
o Minor bugfixes (testing, portability):
- Fix our Python reference-implementation for the v3 onion service
handshake so that it works correctly with the version of hashlib provided
by Python 3.9. Fixes part of bug 40179; bugfix on 0.3.1.6-rc.
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment