tor  0.4.0.0-alpha-dev
routerkeys.h
1 /* Copyright (c) 2014-2018, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
4 #ifndef TOR_ROUTERKEYS_H
5 #define TOR_ROUTERKEYS_H
6 
8 
9 const ed25519_public_key_t *get_master_identity_key(void);
10 const ed25519_keypair_t *get_master_signing_keypair(void);
11 const struct tor_cert_st *get_master_signing_key_cert(void);
12 
13 const ed25519_keypair_t *get_current_auth_keypair(void);
14 const struct tor_cert_st *get_current_link_cert_cert(void);
15 const struct tor_cert_st *get_current_auth_key_cert(void);
16 
17 void get_master_rsa_crosscert(const uint8_t **cert_out,
18  size_t *size_out);
19 
21 
23  const curve25519_keypair_t *onion_key,
24  const ed25519_public_key_t *master_id_key,
25  time_t now, time_t lifetime,
26  int *sign_out);
27 uint8_t *make_tap_onion_key_crosscert(const crypto_pk_t *onion_key,
28  const ed25519_public_key_t *master_id_key,
29  const crypto_pk_t *rsa_id_key,
30  int *len_out);
31 
32 int log_cert_expiration(void);
33 int load_ed_keys(const or_options_t *options, time_t now);
34 int should_make_new_ed_keys(const or_options_t *options, const time_t now);
35 
36 int generate_ed_link_cert(const or_options_t *options, time_t now, int force);
37 
38 void routerkeys_free_all(void);
39 
40 #ifdef TOR_UNIT_TESTS
41 const ed25519_keypair_t *get_master_identity_keypair(void);
42 void init_mock_ed_keys(const crypto_pk_t *rsa_identity_key);
43 #endif
44 
45 #endif /* !defined(TOR_ROUTERKEYS_H) */
int load_ed_keys(const or_options_t *options, time_t now)
Definition: routerkeys.c:55
int should_make_new_ed_keys(const or_options_t *options, const time_t now)
Definition: routerkeys.c:421
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)
Definition: routerkeys.c:699
Header for crypto_ed25519.c.
int router_ed25519_id_is_me(const ed25519_public_key_t *id)
Definition: routerkeys.c:618
int generate_ed_link_cert(const or_options_t *options, time_t now, int force)
Definition: routerkeys.c:365
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)
Definition: routerkeys.c:676
int log_cert_expiration(void)
Definition: routerkeys.c:593