summaryrefslogtreecommitdiff
path: root/src/feature/relay/routerkeys.c
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-02-19 18:52:54 +1000
committerteor <teor@torproject.org>2019-02-19 21:54:13 +1000
commit0c0f21582285bec0fe68f71e293158eeedaeeaa3 (patch)
tree66822a151c0cbc03a06c7c382b61da36fcd3f5c7 /src/feature/relay/routerkeys.c
parent39ab6c9f7360b77901efefae7dd4b18d5df47b90 (diff)
downloadtor-0c0f21582285bec0fe68f71e293158eeedaeeaa3.tar.gz
tor-0c0f21582285bec0fe68f71e293158eeedaeeaa3.zip
routerkeys: Log failures at info-level in make_tap_onion_key_crosscert()
Diffstat (limited to 'src/feature/relay/routerkeys.c')
-rw-r--r--src/feature/relay/routerkeys.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/feature/relay/routerkeys.c b/src/feature/relay/routerkeys.c
index bdd7a82b58..d965777ad6 100644
--- a/src/feature/relay/routerkeys.c
+++ b/src/feature/relay/routerkeys.c
@@ -706,6 +706,8 @@ make_tap_onion_key_crosscert(const crypto_pk_t *onion_key,
*len_out = 0;
if (crypto_pk_get_digest(rsa_id_key, (char*)signed_data) < 0) {
+ log_info(LD_OR, "crypto_pk_get_digest failed in "
+ "make_tap_onion_key_crosscert!");
return NULL;
}
memcpy(signed_data + DIGEST_LEN, master_id_key->pubkey, ED25519_PUBKEY_LEN);
@@ -713,8 +715,12 @@ make_tap_onion_key_crosscert(const crypto_pk_t *onion_key,
int r = crypto_pk_private_sign(onion_key,
(char*)signature, sizeof(signature),
(const char*)signed_data, sizeof(signed_data));
- if (r < 0)
+ if (r < 0) {
+ /* It's probably missing the private key */
+ log_info(LD_OR, "crypto_pk_private_sign failed in "
+ "make_tap_onion_key_crosscert!");
return NULL;
+ }
*len_out = r;