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/test/test_hs_common.c | |
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/test/test_hs_common.c')
-rw-r--r-- | src/test/test_hs_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c index 61306778d4..20f88b637b 100644 --- a/src/test/test_hs_common.c +++ b/src/test/test_hs_common.c @@ -53,14 +53,14 @@ test_validate_address(void *arg) setup_full_capture_of_logs(LOG_WARN); ret = hs_address_is_valid("blah"); tt_int_op(ret, OP_EQ, 0); - expect_log_msg_containing("has an invalid length"); + expect_log_msg_containing("Invalid length"); teardown_capture_of_logs(); setup_full_capture_of_logs(LOG_WARN); ret = hs_address_is_valid( "p3xnclpu4mu22dwaurjtsybyqk4xfjmcfz6z62yl24uwmhjatiwnlnadb"); tt_int_op(ret, OP_EQ, 0); - expect_log_msg_containing("has an invalid length"); + expect_log_msg_containing("Invalid length"); teardown_capture_of_logs(); /* Invalid checksum (taken from prop224) */ @@ -83,7 +83,7 @@ test_validate_address(void *arg) ret = hs_address_is_valid( "????????????????????????????????????????????????????????"); tt_int_op(ret, OP_EQ, 0); - expect_log_msg_containing("can't be decoded"); + expect_log_msg_containing("Unable to base32 decode"); teardown_capture_of_logs(); /* Valid address. */ |