aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_descriptor.c
AgeCommit message (Collapse)Author
2020-09-17Fix wide linesNick Mathewson
2020-09-17Rename tor_cert_create to tor_cert_create_ed25519Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ tor_cert_create tor_cert_create_ed25519 It was generated with --no-verify, so it probably breaks some commit hooks. The commiter should be sure to fix them up in a subsequent commit.
2020-03-30Merge branch 'maint-0.4.3'David Goulet
2020-03-30hs-v3: Relax severity of a log message when decoding descriptors.George Kadianakis
Make it LOG_PROTOCOL_WARN and also add the expiration timestamp in there to ease debugging in the future.
2020-01-21Turn hs_subcredential_t into a proper struct.Nick Mathewson
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Use new ENABLE/DISABLE_GCC_WARNINGNick Mathewson
This is an automated commit, generated by: perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-11-18hs-v3: Keep descriptor in cache if client auth is missing or badDavid Goulet
We now keep the descriptor in the cache, obviously not decoded, if it can't be decrypted for which we believe client authorization is missing or unusable (bad). This way, it can be used later once the client authorization are added or updated. Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-17hs-v3: Add a series of decoding error codeDavid Goulet
This commit introduces the hs_desc_decode_status_t enum which aims at having more fine grained error code when decoding a descriptor. This will be useful in later commits when we support keeping a descriptor that can't be decrypted due to missing or bad client authorization creds. No behavior change. Part of #30382. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-30Merge branch 'tor-github/pr/909'David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-30Use preloaded-rng code in test_hs_descriptor.cNick Mathewson
2019-04-05crypto_format: Remove the return value from ed25519_signature_to_base64()teor
Also remove all checks for the return value, which were redundant anyway, because the function never failed. Part of 29660.
2019-03-12hs: abolish hs_desc_link_specifier_tteor
The previous commits for 23576 confused hs_desc_link_specifier_t and link_specifier_t. Removing hs_desc_link_specifier_t fixes this confusion. Fixes bug 22781; bugfix on 0.3.2.1-alpha.
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-09-18Make crypto_strongest_rand() non-mockableNick Mathewson
Instead, have it call a mockable function. We don't want crypto_strongest_rand() to be mockable, since doing so creates a type error when we call it from ed25519-donna, which we do not build in a test mode. Fixes bug 27728; bugfix on 0.3.5.1-alpha
2018-09-10test: Fix coverity CID 1439131David Goulet
Simple uninitialized object that we could free in an HS v3 unit test. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07HSv3: Add subcredential in client auth KDF on the service-side.George Kadianakis
Also update some client auth test vectors that broke...
2018-09-07hs-v3: Make hs_desc_build_fake_authorized_client() return an objectDavid Goulet
Return a newly allocated fake client authorization object instead of taking the object as a parameter. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07hs-v3: Rename client_pk to client_auth_pkSuphanat Chunhapanya
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07hs-v3: Rename client_sk to client_auth_skSuphanat Chunhapanya
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07hs-v3: Make all descriptor content free functions publicSuphanat Chunhapanya
Series of functions that we now need in hs_service.c. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07test: HS v3 descriptor decoding with client authorizationSuphanat Chunhapanya
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07hs-v3: Refactor the descriptor decryption/decodingSuphanat Chunhapanya
This commit refactors the existing decryption code to make it compatible with a new logic for when the client authorization is enabled. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07test: HS v3 descriptor encoding with client authorizationSuphanat Chunhapanya
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07hs-v3: Encrypt the descriptor using a cookieSuphanat Chunhapanya
Previously, we encrypted the descriptor without the descriptor cookie. This commit, when the client auth is enabled, the descriptor cookie is always used. I also removed the code that is used to generate fake auth clients because it will not be used anymore. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-09-07test: Build an HSv3 descriptor with authorized clientSuphanat Chunhapanya
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Minimize headers that include crypto_formats and x25519 stuffNick Mathewson
2018-06-29Merge branch 'maint-0.3.4'Nick Mathewson
2018-06-29Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-06-29Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-29Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-06-29Fix some memory errors in the recent coverity fixes.Nick Mathewson
Found by asan on travis :/
2018-06-29Merge branch 'maint-0.3.4'Nick Mathewson
2018-06-29Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-06-29Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-06-29Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-06-29Merge remote-tracking branch 'ahf-github/maint-0.3.0' into maint-0.3.1Nick Mathewson
2018-06-23Fix memory link in test_link_specifier().Alexander Færøy
This patch fixes a memory leak in test_link_specifier() where ls might not get freed in case one of the test macros fails. See: Coverity CID 1437434.
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-03-26Merge branch 'bug24658-rm-curve25519-header' into bug24658-mergeNick Mathewson
2018-02-20crypto: Remove unnecessary curve25519 header from crypto_digest.h.Isis Lovecruft
* ADD includes for "torint.h" and "container.h" to crypto_digest.h. * ADD includes for "crypto_digest.h" to a couple places in which crypto_digest_t was then missing. * FIXES part of #24658: https://bugs.torproject.org/24658#comment:30
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2017-09-12clang scan-build: Fix "dead increment" warnings.Nick Mathewson
For the most part, these indicated a spot where the code could have been better.
2017-09-05test: Fix memory leak in hs_descriptor/decode_bad_signatureDavid Goulet
Fixes #23319 Cherry-picked from master; bug not in any released Tor.