summaryrefslogtreecommitdiff
path: root/src/or/hs_descriptor.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2017-02-14 17:36:00 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2017-03-13 15:55:21 +0200
commite6b03151fb98a40f9f039424e3c3e8c99ce41371 (patch)
treec07380a34e8675a0d5755e4d0edad537636df0bc /src/or/hs_descriptor.c
parent163596d9c25d4836dde37675372271d8358ffc81 (diff)
downloadtor-e6b03151fb98a40f9f039424e3c3e8c99ce41371.tar.gz
tor-e6b03151fb98a40f9f039424e3c3e8c99ce41371.zip
prop224: Add unittests for decode_superencrypted().
Diffstat (limited to 'src/or/hs_descriptor.c')
-rw-r--r--src/or/hs_descriptor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c
index 7c43d604c2..d15c16054f 100644
--- a/src/or/hs_descriptor.c
+++ b/src/or/hs_descriptor.c
@@ -1439,6 +1439,7 @@ superencrypted_auth_data_is_valid(smartlist_t *tokens)
tok = find_by_keyword(tokens, R3_DESC_AUTH_TYPE);
tor_assert(tok->n_args >= 1);
if (strcmp(tok->args[0], "x25519")) {
+ log_warn(LD_DIR, "Unrecognized desc auth type");
return 0;
}
}
@@ -1485,6 +1486,7 @@ decode_superencrypted(const char *message, size_t message_len,
/* Do some rudimentary validation of the authentication data */
if (!superencrypted_auth_data_is_valid(tokens)) {
+ log_warn(LD_REND, "Invalid auth data");
goto err;
}