diff options
author | David Goulet <dgoulet@torproject.org> | 2020-01-13 12:15:14 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-21 10:28:26 -0500 |
commit | 16a201e7039577070201828750e0b092f0e8eb7f (patch) | |
tree | c601d4a543a4204c02e657623203bc65cd2622fd /src/feature/hs/hs_common.h | |
parent | ff93133403fa927eedc424dfb00557fcaab6aede (diff) | |
download | tor-16a201e7039577070201828750e0b092f0e8eb7f.tar.gz tor-16a201e7039577070201828750e0b092f0e8eb7f.zip |
hs-v3: Implement hs_parse_address_no_log()
The hs_parse_address() can not be used without an options_t object existing
since on error it uses the escaped_safe_str() that looks at the options.
This new function won't log and returns an error message in case of failure
that can then be used to log.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_common.h')
-rw-r--r-- | src/feature/hs/hs_common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/feature/hs/hs_common.h b/src/feature/hs/hs_common.h index 8f743d4d37..2bcf0f67c4 100644 --- a/src/feature/hs/hs_common.h +++ b/src/feature/hs/hs_common.h @@ -179,6 +179,10 @@ void hs_build_address(const struct ed25519_public_key_t *key, uint8_t version, int hs_address_is_valid(const char *address); int hs_parse_address(const char *address, struct ed25519_public_key_t *key_out, uint8_t *checksum_out, uint8_t *version_out); +int hs_parse_address_no_log(const char *address, + struct ed25519_public_key_t *key_out, + uint8_t *checksum_out, uint8_t *version_out, + const char **errmsg); void hs_build_blinded_pubkey(const struct ed25519_public_key_t *pubkey, const uint8_t *secret, size_t secret_len, |