aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerkeys.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-08 16:49:24 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-08 16:49:24 -0500
commite93234af70da5cf3d513e57b12e4934b1c4d9529 (patch)
treee8c72b7f9a1cbbedd154444bdb23b54c051c48ea /src/or/routerkeys.c
parente33c85a450c4819cdad30acfc280aece7c521d6e (diff)
parent236e8b605e6aebf87787951ca05f5c75ad530c8a (diff)
downloadtor-e93234af70da5cf3d513e57b12e4934b1c4d9529.tar.gz
tor-e93234af70da5cf3d513e57b12e4934b1c4d9529.zip
Merge branch 'feature15056_v1_squashed'
Diffstat (limited to 'src/or/routerkeys.c')
-rw-r--r--src/or/routerkeys.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c
index 6c53c50305..51802b15e5 100644
--- a/src/or/routerkeys.c
+++ b/src/or/routerkeys.c
@@ -1099,6 +1099,14 @@ get_master_identity_key(void)
return &master_identity_key->pubkey;
}
+/** Return true iff <b>id</b> is our Ed25519 master identity key. */
+int
+router_ed25519_id_is_me(const ed25519_public_key_t *id)
+{
+ return id && master_identity_key &&
+ ed25519_pubkey_eq(id, &master_identity_key->pubkey);
+}
+
#ifdef TOR_UNIT_TESTS
/* only exists for the unit tests, since otherwise the identity key
* should be used to sign nothing but the signing key. */