diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-12 17:05:39 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-12 17:05:39 -0500 |
commit | f92736517baa2f19b0ff3827684f11b1b1f29ffd (patch) | |
tree | 24314c5ec17da38bf8d99e585689c44cf2b2ea7c /src/or/nodelist.c | |
parent | 11eaf208c0aaa7c252ead6343ea65a3576227d69 (diff) | |
parent | fb718e9912f4c636fb1035a0d30aea250a6a53e4 (diff) | |
download | tor-f92736517baa2f19b0ff3827684f11b1b1f29ffd.tar.gz tor-f92736517baa2f19b0ff3827684f11b1b1f29ffd.zip |
Merge branch 'bug23577_squashed'
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 30ffd9a637..cb324e9b03 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -1639,6 +1639,18 @@ node_has_curve25519_onion_key(const node_t *node) return 0; } +/** Return the curve25519 key of <b>node</b>, or NULL if none. */ +curve25519_public_key_t * +node_get_curve25519_onion_key(const node_t *node) +{ + if (node->ri) + return node->ri->onion_curve25519_pkey; + else if (node->md) + return node->md->onion_curve25519_pkey; + else + return NULL; +} + /** Refresh the country code of <b>ri</b>. This function MUST be called on * each router when the GeoIP database is reloaded, and on all new routers. */ void |