aboutsummaryrefslogtreecommitdiff
path: root/src/or/nodelist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-06 01:53:29 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-03 11:29:47 -0500
commitb2863739083125d332cf1166ae6b095df7d0f155 (patch)
tree44e6a25866048d143b1e739a46528823306ff9e7 /src/or/nodelist.c
parentecf88b16b8672c8b734d13d84910e97357c470a8 (diff)
downloadtor-b2863739083125d332cf1166ae6b095df7d0f155.tar
tor-b2863739083125d332cf1166ae6b095df7d0f155.tar.gz
Enable the ntor handshake on the client side.
"works for me"
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r--src/or/nodelist.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 95345fb26..fa3828fc2 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -916,6 +916,18 @@ node_get_pref_ipv6_orport(const node_t *node, tor_addr_port_t *ap_out)
}
}
+/** Return true iff <b>node</b> has a curve25519 onion key. */
+int
+node_has_curve25519_onion_key(const node_t *node)
+{
+ if (node->ri)
+ return node->ri->onion_curve25519_pkey != NULL;
+ else if (node->md)
+ return node->md->onion_curve25519_pkey != NULL;
+ else
+ return 0;
+}
+
/** 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