|
Tor 0.4.9.8
|
#include "lib/testsupport/testsupport.h"Go to the source code of this file.
Macros | |
| #define | KEYPIN_FOUND 0 |
| #define | KEYPIN_ADDED 1 |
| #define | KEYPIN_MISMATCH -1 |
| #define | KEYPIN_NOT_FOUND -2 |
Functions | |
| int | keypin_check_and_add (const uint8_t *rsa_id_digest, const uint8_t *ed25519_id_key, const int replace_existing_entry) |
| int | keypin_check (const uint8_t *rsa_id_digest, const uint8_t *ed25519_id_key) |
| int | keypin_close_journal (void) |
| static int | keypin_open_journal (const char *fname) |
| static int | keypin_load_journal (const char *fname) |
| void | keypin_clear (void) |
| int | keypin_check_lone_rsa (const uint8_t *rsa_id_digest) |
| int keypin_check | ( | const uint8_t * | rsa_id_digest, |
| const uint8_t * | ed25519_id_key ) |
As keypin_check_and_add, but do not add. Return KEYPIN_NOT_FOUND if we would add.
Definition at line 153 of file keypin.c.
Referenced by dirserv_router_get_status().
| int keypin_check_and_add | ( | const uint8_t * | rsa_id_digest, |
| const uint8_t * | ed25519_id_key, | ||
| const int | replace_existing_entry ) |
Check whether we already have an entry in the key pinning table for a router with RSA ID digest rsa_id_digest or for ed25519 key ed25519_id_key. If we have an entry that matches both keys, return KEYPIN_FOUND. If we find an entry that matches one key but not the other, return KEYPIN_MISMATCH. If we have no entry for either key, add such an entry to the table and return KEYPIN_ADDED.
If replace_existing_entry is true, then any time we would have said KEYPIN_FOUND, we instead add this entry anyway and return KEYPIN_ADDED.
Definition at line 140 of file keypin.c.
Referenced by dirserv_add_descriptor().
| int keypin_check_lone_rsa | ( | const uint8_t * | rsa_id_digest | ) |
Check whether we already have an entry in the key pinning table for a router with RSA ID digest rsa_id_digest. If we have no such entry, return KEYPIN_NOT_FOUND. If we find an entry that matches the RSA key but which has an ed25519 key, return KEYPIN_MISMATCH.
Definition at line 280 of file keypin.c.
Referenced by dirserv_add_descriptor(), and dirserv_router_get_status().
| void keypin_clear | ( | void | ) |
| int keypin_close_journal | ( | void | ) |
Close the keypinning journal file.
Definition at line 335 of file keypin.c.
Referenced by keypin_journal_append_entry().
|
inlinestatic |