summaryrefslogtreecommitdiff
path: root/src/or/onion_ntor.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-06 12:37:52 -0400
committerNick Mathewson <nickm@torproject.org>2016-07-06 12:37:52 -0400
commitae22c249c3423acfb7938a36c2c8c5b2cac7fb29 (patch)
treefea7ad723c1f32ed43dcad07012170fc266ec08f /src/or/onion_ntor.c
parent9c1d8cdd8d22f4004a0dec144527d73656bace2d (diff)
downloadtor-ae22c249c3423acfb7938a36c2c8c5b2cac7fb29.tar.gz
tor-ae22c249c3423acfb7938a36c2c8c5b2cac7fb29.zip
Improve test coverage a little on onion*.c
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);