summaryrefslogtreecommitdiff
path: root/changes
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2016-08-26 11:06:09 -0400
committerDavid Goulet <dgoulet@torproject.org>2016-08-26 14:46:29 -0400
commitf46ce6e3d8bea3cf00388c87c29cdcafd4bab350 (patch)
treebab17085faa12ca1e7a667e1d1625dc546d8a53d /changes
parent8fe410e875343a4c134ddbe0db6da3d38865deee (diff)
downloadtor-f46ce6e3d8bea3cf00388c87c29cdcafd4bab350.tar.gz
tor-f46ce6e3d8bea3cf00388c87c29cdcafd4bab350.zip
test: Fix shared random unit test for big endian
Copying the integer 42 in a char buffer has a different representation depending on the endianess of the system thus that unit test was failing on big endian system. This commit introduces a python script, like the one we have for SRV, that computes a COMMIT/REVEAL from scratch so we can use it as a test vector for our encoding unit tests. With this, we use a random value of bytes instead of a number fixing the endianess issue and making the whole test case more solid with an external tool that builds the COMMIT and REVEAL according to the spec. Fixes #19977 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'changes')
-rw-r--r--changes/199776
1 files changed, 6 insertions, 0 deletions
diff --git a/changes/19977 b/changes/19977
new file mode 100644
index 0000000000..0ca1af1cea
--- /dev/null
+++ b/changes/19977
@@ -0,0 +1,6 @@
+ o Minor bugfixes (unit test)
+ - Fix shared random unit test that was failing on big endian architecture
+ due to internal representation of a integer copied to a buffer. The test
+ is changed to take a full 32 bytes of data and use the output of a
+ python script that make the COMMIT and REVEAL calculation according to
+ the spec. Fixes #19977; bugfix on tor-0.2.9.1-alpha.