diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-02-08 14:22:22 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2017-03-13 15:55:21 +0200 |
commit | 1f421d8d47e914bfc826616498c22efbb7289b2e (patch) | |
tree | f0be18882963cb93d6c97c9db2e5c0d5474ac7ce /src/test/test_hs_descriptor.c | |
parent | d0fe199269addb9cab5070691a8b3be186d49986 (diff) | |
download | tor-1f421d8d47e914bfc826616498c22efbb7289b2e.tar.gz tor-1f421d8d47e914bfc826616498c22efbb7289b2e.zip |
prop224: Fix the HS descriptor unittests.
- HS descriptors are now bigger than 10kb.
- encrypted_data_length_is_valid() is not that strict now.
Diffstat (limited to 'src/test/test_hs_descriptor.c')
-rw-r--r-- | src/test/test_hs_descriptor.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c index 4042e647da..bd361be692 100644 --- a/src/test/test_hs_descriptor.c +++ b/src/test/test_hs_descriptor.c @@ -590,19 +590,11 @@ test_encrypted_data_len(void *arg) /* No length, error. */ ret = encrypted_data_length_is_valid(0); tt_int_op(ret, OP_EQ, 0); - /* Not a multiple of our encryption algorithm (thus no padding). It's - * suppose to be aligned on HS_DESC_PLAINTEXT_PADDING_MULTIPLE. */ - value = HS_DESC_PLAINTEXT_PADDING_MULTIPLE * 10 - 1; - ret = encrypted_data_length_is_valid(value); - tt_int_op(ret, OP_EQ, 0); /* Valid value. */ - value = HS_DESC_PADDED_PLAINTEXT_MAX_LEN + HS_DESC_ENCRYPTED_SALT_LEN + - DIGEST256_LEN; + value = HS_DESC_ENCRYPTED_SALT_LEN + DIGEST256_LEN + 1; ret = encrypted_data_length_is_valid(value); tt_int_op(ret, OP_EQ, 1); - /* XXX: Test maximum possible size. */ - done: ; } |