mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-21 05:26:20 +02:00
Merge remote-tracking branch 'asn/ticket22727_032_02'
This commit is contained in:
commit
3402b14089
@ -707,6 +707,48 @@ node_supports_ed25519_link_authentication(const node_t *node)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Return true iff <b>node</b> supports the hidden service directory version
|
||||||
|
* 3 protocol (proposal 224). */
|
||||||
|
int
|
||||||
|
node_supports_v3_hsdir(const node_t *node)
|
||||||
|
{
|
||||||
|
tor_assert(node);
|
||||||
|
|
||||||
|
if (node->rs) {
|
||||||
|
return node->rs->supports_v3_hsdir;
|
||||||
|
}
|
||||||
|
if (node->ri) {
|
||||||
|
if (node->ri->protocol_list == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return protocol_list_supports_protocol(node->ri->protocol_list,
|
||||||
|
PRT_HSDIR, PROTOVER_HSDIR_V3);
|
||||||
|
}
|
||||||
|
tor_assert_nonfatal_unreached_once();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Return true iff <b>node</b> supports ed25519 authentication as an hidden
|
||||||
|
* service introduction point.*/
|
||||||
|
int
|
||||||
|
node_supports_ed25519_hs_intro(const node_t *node)
|
||||||
|
{
|
||||||
|
tor_assert(node);
|
||||||
|
|
||||||
|
if (node->rs) {
|
||||||
|
return node->rs->supports_ed25519_hs_intro;
|
||||||
|
}
|
||||||
|
if (node->ri) {
|
||||||
|
if (node->ri->protocol_list == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return protocol_list_supports_protocol(node->ri->protocol_list,
|
||||||
|
PRT_HSINTRO, PROTOVER_HS_INTRO_V3);
|
||||||
|
}
|
||||||
|
tor_assert_nonfatal_unreached_once();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/** Return the RSA ID key's SHA1 digest for the provided node. */
|
/** Return the RSA ID key's SHA1 digest for the provided node. */
|
||||||
const uint8_t *
|
const uint8_t *
|
||||||
node_get_rsa_id_digest(const node_t *node)
|
node_get_rsa_id_digest(const node_t *node)
|
||||||
|
@ -58,6 +58,8 @@ const ed25519_public_key_t *node_get_ed25519_id(const node_t *node);
|
|||||||
int node_ed25519_id_matches(const node_t *node,
|
int node_ed25519_id_matches(const node_t *node,
|
||||||
const ed25519_public_key_t *id);
|
const ed25519_public_key_t *id);
|
||||||
int node_supports_ed25519_link_authentication(const node_t *node);
|
int node_supports_ed25519_link_authentication(const node_t *node);
|
||||||
|
int node_supports_v3_hsdir(const node_t *node);
|
||||||
|
int node_supports_ed25519_hs_intro(const node_t *node);
|
||||||
const uint8_t *node_get_rsa_id_digest(const node_t *node);
|
const uint8_t *node_get_rsa_id_digest(const node_t *node);
|
||||||
|
|
||||||
int node_has_ipv6_addr(const node_t *node);
|
int node_has_ipv6_addr(const node_t *node);
|
||||||
|
@ -17,6 +17,11 @@
|
|||||||
/* This is a guess. */
|
/* This is a guess. */
|
||||||
#define FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS "0.2.9.3-alpha"
|
#define FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS "0.2.9.3-alpha"
|
||||||
|
|
||||||
|
/** The protover version number that signifies HSDir support for HSv3 */
|
||||||
|
#define PROTOVER_HSDIR_V3 2
|
||||||
|
/** The protover version number that signifies HSv3 intro point support */
|
||||||
|
#define PROTOVER_HS_INTRO_V3 4
|
||||||
|
|
||||||
/** List of recognized subprotocols. */
|
/** List of recognized subprotocols. */
|
||||||
typedef enum protocol_type_t {
|
typedef enum protocol_type_t {
|
||||||
PRT_LINK,
|
PRT_LINK,
|
||||||
|
Loading…
Reference in New Issue
Block a user