mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Merge branch 'maint-0.3.4'
This commit is contained in:
commit
228d25ddf6
5
changes/bug26535.029
Normal file
5
changes/bug26535.029
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (testing, compatibility):
|
||||
- When running the ntor_ref.py test, make sure only to pass strings
|
||||
(rather than "bytes" objects) to the Python subprocess module.
|
||||
Python 3 on Windows seems to require this. Fixes bug 26535; bugfix on
|
||||
0.2.5.5-alpha.
|
5
changes/bug26535.032
Normal file
5
changes/bug26535.032
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes (testing, compatibility):
|
||||
- When running the hs_ntor_ref.py test, make sure only to pass strings
|
||||
(rather than "bytes" objects) to the Python subprocess module.
|
||||
Python 3 on Windows seems to require this. Fixes bug 26535; bugfix on
|
||||
0.3.1.1-alpha.
|
@ -234,8 +234,11 @@ Utilities for communicating with the little-t-tor ntor wrapper to conduct the
|
||||
integration tests
|
||||
"""
|
||||
|
||||
PROG = b"./src/test/test-hs-ntor-cl"
|
||||
enhex=lambda s: binascii.b2a_hex(s)
|
||||
PROG = "./src/test/test-hs-ntor-cl"
|
||||
if sys.version_info[0] >= 3:
|
||||
enhex=lambda s: binascii.b2a_hex(s).decode("ascii")
|
||||
else:
|
||||
enhex=lambda s: binascii.b2a_hex(s)
|
||||
dehex=lambda s: binascii.a2b_hex(s.strip())
|
||||
|
||||
def tor_client1(intro_auth_pubkey_str, intro_enc_pubkey,
|
||||
|
@ -336,13 +336,16 @@ def test_tor():
|
||||
Call the test-ntor-cl command-line program to make sure we can
|
||||
interoperate with Tor's ntor program
|
||||
"""
|
||||
enhex=lambda s: binascii.b2a_hex(s)
|
||||
if sys.version_info[0] >= 3:
|
||||
enhex=lambda s: binascii.b2a_hex(s).decode("ascii")
|
||||
else:
|
||||
enhex=lambda s: binascii.b2a_hex(s)
|
||||
dehex=lambda s: binascii.a2b_hex(s.strip())
|
||||
|
||||
PROG = b"./src/test/test-ntor-cl"
|
||||
PROG = "./src/test/test-ntor-cl"
|
||||
def tor_client1(node_id, pubkey_B):
|
||||
" returns (msg, state) "
|
||||
p = subprocess.Popen([PROG, b"client1", enhex(node_id),
|
||||
p = subprocess.Popen([PROG, "client1", enhex(node_id),
|
||||
enhex(pubkey_B.serialize())],
|
||||
stdout=subprocess.PIPE)
|
||||
return map(dehex, p.stdout.readlines())
|
||||
|
Loading…
Reference in New Issue
Block a user