summaryrefslogtreecommitdiff
path: root/src/or/onion_ntor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/onion_ntor.c')
-rw-r--r--src/or/onion_ntor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/onion_ntor.c b/src/or/onion_ntor.c
index 33afc27895..d1a268f4cd 100644
--- a/src/or/onion_ntor.c
+++ b/src/or/onion_ntor.c
@@ -85,8 +85,13 @@ onion_skin_ntor_create(const uint8_t *router_id,
memcpy(state->router_id, router_id, DIGEST_LEN);
memcpy(&state->pubkey_B, router_key, sizeof(curve25519_public_key_t));
if (curve25519_secret_key_generate(&state->seckey_x, 0) < 0) {
+ /* LCOV_EXCL_START
+ * Secret key generation should be unable to fail when the key isn't
+ * marked as "extra-strong" */
+ tor_assert_nonfatal_unreached();
tor_free(state);
return -1;
+ /* LCOV_EXCL_STOP */
}
curve25519_public_key_generate(&state->pubkey_X, &state->seckey_x);