diff options
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/router.c b/src/or/router.c index 2a2493998d..9b22d86ed1 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1094,6 +1094,19 @@ router_digest_is_me(const char *digest) return identitykey && !memcmp(identitykey_digest, digest, DIGEST_LEN); } +/** Return true iff I'm a server and <b>digest</b> is equal to + * my identity digest. */ +int +router_extrainfo_digest_is_me(const char *digest) +{ + if (!router_get_my_extrainfo()) + return 0; + + return !memcmp(digest, + &(router_get_my_extrainfo()->cache_info).signed_descriptor_digest, + DIGEST_LEN); +} + /** A wrapper around router_digest_is_me(). */ int router_is_me(routerinfo_t *router) |