Fix wide lines

This commit is contained in:
Nick Mathewson 2020-09-17 08:19:53 -04:00
parent c92e19268b
commit 22643272d2
5 changed files with 13 additions and 9 deletions

View File

@ -1717,7 +1717,8 @@ build_desc_signing_key_cert(hs_service_descriptor_t *desc, time_t now)
CERT_FLAG_INCLUDE_SIGNING_KEY);
/* If the cert creation fails, the descriptor encoding will fail and thus
* ultimately won't be uploaded. We'll get a stack trace to help us learn
* where the call came from and the tor_cert_create_ed25519() will log the error. */
* where the call came from and the tor_cert_create_ed25519() will log the
* error. */
tor_assert_nonfatal(plaintext->signing_key_cert);
}

View File

@ -37,7 +37,7 @@
#include "core/or/or_handshake_certs_st.h"
/** Helper for tor_cert_create_ed25519(): signs any 32 bytes, not just an ed25519
/** Helper for tor_cert_create_*(): signs any 32 bytes, not just an ed25519
* key.
*/
static tor_cert_t *

View File

@ -699,8 +699,8 @@ make_ntor_onion_key_crosscert(const curve25519_keypair_t *onion_key,
onion_key) < 0)
goto end;
cert = tor_cert_create_ed25519(&ed_onion_key, CERT_TYPE_ONION_ID, master_id_key,
now, lifetime, 0);
cert = tor_cert_create_ed25519(&ed_onion_key, CERT_TYPE_ONION_ID,
master_id_key, now, lifetime, 0);
end:
memwipe(&ed_onion_key, 0, sizeof(ed_onion_key));

View File

@ -75,7 +75,8 @@ hs_helper_build_intro_point(const ed25519_keypair_t *signing_kp, time_t now,
ret = ed25519_keypair_generate(&auth_kp, 0);
tt_int_op(ret, OP_EQ, 0);
}
ip->auth_key_cert = tor_cert_create_ed25519(signing_kp, CERT_TYPE_AUTH_HS_IP_KEY,
ip->auth_key_cert = tor_cert_create_ed25519(signing_kp,
CERT_TYPE_AUTH_HS_IP_KEY,
&auth_kp.pubkey, now,
HS_DESC_CERT_LIFETIME,
CERT_FLAG_INCLUDE_SIGNING_KEY);
@ -110,7 +111,8 @@ hs_helper_build_intro_point(const ed25519_keypair_t *signing_kp, time_t now,
}
ed25519_keypair_from_curve25519_keypair(&ed25519_kp, &signbit,
&curve25519_kp);
cross_cert = tor_cert_create_ed25519(signing_kp, CERT_TYPE_CROSS_HS_IP_KEYS,
cross_cert = tor_cert_create_ed25519(signing_kp,
CERT_TYPE_CROSS_HS_IP_KEYS,
&ed25519_kp.pubkey, time(NULL),
HS_DESC_CERT_LIFETIME,
CERT_FLAG_INCLUDE_SIGNING_KEY);

View File

@ -726,8 +726,9 @@ test_validate_cert(void *arg)
tor_cert_free(cert);
/* Try a cert without including the signing key. */
cert = tor_cert_create_ed25519(&kp, CERT_TYPE_AUTH_HS_IP_KEY, &kp.pubkey, now,
3600, 0);
cert = tor_cert_create_ed25519(&kp, CERT_TYPE_AUTH_HS_IP_KEY,
&kp.pubkey, now, 3600, 0);
tt_assert(cert);
/* Test with a bad type. */
ret = cert_is_valid(cert, CERT_TYPE_AUTH_HS_IP_KEY, "unicorn");