David Goulet
0cc18ef64c
test: Move duplicate HS test code and unify it
...
Create the hs_test_helpers.{c|h} files that contains helper functions to
create introduction point, descriptor and compare descriptor.
Used by both the hs cache and hs descriptor tests. Unify them to avoid code
duplication.
Also, this commit fixes the usage of the signing key that was wrongly used
when creating a cross signed certificate.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-05-09 10:30:37 -04:00
Nick Mathewson
7505f452c8
Run the copyright update script.
2017-03-15 16:13:17 -04:00
George Kadianakis
1f421d8d47
prop224: Fix the HS descriptor unittests.
...
- HS descriptors are now bigger than 10kb.
- encrypted_data_length_is_valid() is not that strict now.
2017-03-13 15:55:21 +02:00
George Kadianakis
6d71eda263
prop224: Rename auth_required HS desc field to intro_auth_required.
...
And remove "password" type from the list of intro auths.
2017-02-24 16:37:24 +02:00
David Goulet
3336f26e60
hs: Avoid a strlen(NULL) if descriptor is not found in cache
...
Instead of returning 404 error code, this led to a NULL pointer being used and
thus a crash of tor.
Fixes #21471
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-02-15 10:27:41 -05:00
J. Ryan Stinnett
19cf074f4d
hs: Remove private keys from hs_desc_plaintext_data_t.
...
Since both the client and service will use that data structure to store the
descriptor decoded data, only the public keys are common to both.
Fixes #20572 .
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-16 12:48:33 -05:00
Nick Mathewson
0fed324c2c
Would you believe me if I said there were more 32-bit and clang warnings?
2016-11-04 15:47:28 -04:00
Nick Mathewson
7a78a37f1d
Fix memory leaks in test_hs_cache.c
2016-11-04 14:39:35 -04:00
Nick Mathewson
ed4aebcd97
Fix more unit test leaks.
2016-11-04 14:35:15 -04:00
Nick Mathewson
29ae8dcf96
Fix a bunch of leaks in hs_cache/upload_and_download_hs_desc
2016-11-04 14:13:30 -04:00
Nick Mathewson
6847b9f6af
Fix make check-spaces
2016-11-04 14:00:08 -04:00
David Goulet
b876e5128a
prop224: fix unit test to actually initialize a connection object
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04 13:53:20 -04:00
David Goulet
3f29688bdf
prop224: Use a const pointer for the cache lookup entry
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04 10:32:50 -04:00
David Goulet
1263f74a12
prop224: Rename cert type to follow naming convention
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-04 10:32:50 -04:00
George Kadianakis
d795ed5871
Make check-spaces happy :)
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:32:50 -04:00
George Kadianakis
a8efd087bd
test: Add prop224 directory fetch/upload unit tests
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:32:50 -04:00
David Goulet
1aeaba4906
test: Add prop224 directory cache unit tests
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04 10:32:49 -04:00