9#ifndef TOR_ROUTERKEYS_H
10#define TOR_ROUTERKEYS_H
14#ifdef HAVE_MODULE_RELAY
18MOCK_DECL(
const struct tor_cert_st *, get_master_signing_key_cert,(
void));
21const struct tor_cert_st *get_current_link_cert_cert(
void);
22const struct tor_cert_st *get_current_auth_key_cert(
void);
24void get_master_rsa_crosscert(
const uint8_t **cert_out,
33 time_t now, time_t lifetime,
46void routerkeys_free_all(
void);
50#define router_ed25519_id_is_me(id) \
54relay_key_is_unavailable_(
void)
58#define relay_key_is_unavailable(type) \
59 ((type)(relay_key_is_unavailable_()))
62#define get_current_auth_keypair() \
63 relay_key_is_unavailable(const ed25519_keypair_t *)
64#define get_master_signing_keypair() \
65 relay_key_is_unavailable(const ed25519_keypair_t *)
66#define get_current_link_cert_cert() \
67 relay_key_is_unavailable(const struct tor_cert_st *)
68#define get_current_auth_key_cert() \
69 relay_key_is_unavailable(const struct tor_cert_st *)
70#define get_master_signing_key_cert() \
71 relay_key_is_unavailable(const struct tor_cert_st *)
72#define get_master_rsa_crosscert(cert_out, size_out) \
74 tor_assert_nonfatal_unreached(); \
78#define get_master_identity_key() \
79 relay_key_is_unavailable(const ed25519_public_key_t *)
81#define generate_ed_link_cert(options, now, force) \
82 ((void)(options), (void)(now), (void)(force), 0)
83#define should_make_new_ed_keys(options, now) \
84 ((void)(options), (void)(now), 0)
87static inline struct tor_cert_st *
90 time_t now, time_t lifetime,
101static inline uint8_t *
117#define log_cert_expiration() \
118 (puts("Not available: Tor has been compiled without relay support"), 0)
121#define load_ed_keys(x,y) \
122 (puts("Not available: Tor has been compiled without relay support"), 0)
128void init_mock_ed_keys(
const crypto_pk_t *rsa_identity_key);
Header for crypto_ed25519.c.
int load_ed_keys(const or_options_t *options, time_t now)
int should_make_new_ed_keys(const or_options_t *options, const time_t now)
int router_ed25519_id_is_me(const ed25519_public_key_t *id)
uint8_t * make_tap_onion_key_crosscert(const crypto_pk_t *onion_key, const ed25519_public_key_t *master_id_key, const crypto_pk_t *rsa_id_key, int *len_out)
tor_cert_t * make_ntor_onion_key_crosscert(const curve25519_keypair_t *onion_key, const ed25519_public_key_t *master_id_key, time_t now, time_t lifetime, int *sign_out)
int log_cert_expiration(void)
int generate_ed_link_cert(const or_options_t *options, time_t now, int force)
#define MOCK_DECL(rv, funcname, arglist)
#define tor_assert_nonfatal_unreached()