Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
a4e8f945
Commit
a4e8f945
authored
Jul 03, 2018
by
Nick Mathewson
🎨
Browse files
Merge branch 'maint-0.2.9' into maint-0.3.2
parents
e6366f78
b205714b
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/bug26535.029
0 → 100644
View file @
a4e8f945
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.
src/test/ntor_ref.py
View file @
a4e8f945
...
...
@@ -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
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment