aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_crypto.c
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2017-04-07 16:33:22 -0400
committerTaylor Yu <catalyst@torproject.org>2017-04-07 18:16:45 -0400
commit00ffefb41bc63d17ff68b7af2c9e8253715c12f3 (patch)
tree9f76b83c86b53af817727e474840d97ddba6f797 /src/test/test_crypto.c
parentf15818f280a6773e41b45a1a45cdb749ce7d611b (diff)
downloadtor-00ffefb41bc63d17ff68b7af2c9e8253715c12f3.tar.gz
tor-00ffefb41bc63d17ff68b7af2c9e8253715c12f3.zip
Test odd-sized base64 decodes
Test base64_decode() with odd sized decoded lengths, including unpadded encodings and padded encodings with "right-sized" output buffers. Convert calls to base64_decode_nopad() to base64_decode() because base64_decode_nopad() is redundant.
Diffstat (limited to 'src/test/test_crypto.c')
-rw-r--r--src/test/test_crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index 7a20150169..ec9d4e2709 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -1470,7 +1470,7 @@ test_crypto_formats(void *arg)
tt_int_op(i, OP_GE, 0);
tt_int_op(i, OP_EQ, strlen(data2));
tt_assert(! strchr(data2, '='));
- j = base64_decode_nopad((uint8_t*)data3, 1024, data2, i);
+ j = base64_decode(data3, 1024, data2, i);
tt_int_op(j, OP_EQ, idx);
tt_mem_op(data3,OP_EQ, data1, idx);
}