diff options
author | teor <teor@torproject.org> | 2020-04-02 13:38:49 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2020-04-09 11:00:04 +1000 |
commit | f8fef609f6335e53f4a9be58a10330d3ff5e7a3f (patch) | |
tree | f7099f6ec8788808551a8ccccb3849108854665b /src/feature/nodelist/nodelist.c | |
parent | eb11c9d07c8f6a1b7e3b8caae3586f0a7804f632 (diff) | |
download | tor-f8fef609f6335e53f4a9be58a10330d3ff5e7a3f.tar.gz tor-f8fef609f6335e53f4a9be58a10330d3ff5e7a3f.zip |
nodelist: Make some functions mockable
Part of 33633.
Diffstat (limited to 'src/feature/nodelist/nodelist.c')
-rw-r--r-- | src/feature/nodelist/nodelist.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c index fcf27b1a3a..7454f342f9 100644 --- a/src/feature/nodelist/nodelist.c +++ b/src/feature/nodelist/nodelist.c @@ -1074,8 +1074,8 @@ node_get_by_nickname,(const char *nickname, unsigned flags)) /** Return the Ed25519 identity key for the provided node, or NULL if it * doesn't have one. */ -const ed25519_public_key_t * -node_get_ed25519_id(const node_t *node) +MOCK_IMPL(const ed25519_public_key_t *, +node_get_ed25519_id,(const node_t *node)) { const ed25519_public_key_t *ri_pk = NULL; const ed25519_public_key_t *md_pk = NULL; @@ -1158,9 +1158,9 @@ node_get_protover_summary_flags(const node_t *node) * by ed25519 ID during the link handshake. If <b>compatible_with_us</b>, * it needs to be using a link authentication method that we understand. * If not, any plausible link authentication method will do. */ -int -node_supports_ed25519_link_authentication(const node_t *node, - int compatible_with_us) +MOCK_IMPL(int, +node_supports_ed25519_link_authentication,(const node_t *node, + int compatible_with_us)) { if (! node_get_ed25519_id(node)) return 0; |