|
@@ -1633,6 +1633,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
|