Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
22643272
Commit
22643272
authored
Sep 17, 2020
by
Nick Mathewson
🐻
Browse files
Fix wide lines
parent
c92e1926
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/feature/hs/hs_service.c
View file @
22643272
...
...
@@ -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
);
}
...
...
src/feature/nodelist/torcert.c
View file @
22643272
...
...
@@ -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
*
...
...
src/feature/relay/routerkeys.c
View file @
22643272
...
...
@@ -466,7 +466,7 @@ init_mock_ed_keys(const crypto_pk_t *rsa_identity_key)
MAKEKEY
(
master_signing_key
);
MAKEKEY
(
current_auth_key
);
#define MAKECERT(cert, signing, signed_, type, flags) \
cert = tor_cert_create_ed25519(signing,
\
cert = tor_cert_create_ed25519(signing, \
type, \
&signed_->pubkey, \
time(NULL), 86400, \
...
...
@@ -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
));
...
...
src/test/hs_test_helpers.c
View file @
22643272
...
...
@@ -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
);
...
...
src/test/test_hs_descriptor.c
View file @
22643272
...
...
@@ -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"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment