diff options
Diffstat (limited to 'src/protocols/ec25519_fhmqvc')
-rw-r--r-- | src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c | 2 | ||||
-rw-r--r-- | src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h | 2 | ||||
-rw-r--r-- | src/protocols/ec25519_fhmqvc/handshake.c | 24 | ||||
-rw-r--r-- | src/protocols/ec25519_fhmqvc/util.c | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c index f9bf1f7..67dfac6 100644 --- a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c +++ b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c @@ -219,7 +219,7 @@ const fastd_protocol_t fastd_protocol_ec25519_fhmqvc = { .peer_configure = protocol_peer_configure, .peer_check = fastd_protocol_ec25519_fhmqvc_peer_check, - .peer_check_temporary = fastd_protocol_ec25519_fhmqvc_peer_check_temporary, + .peer_check_dynamic = fastd_protocol_ec25519_fhmqvc_peer_check_dynamic, .handshake_init = fastd_protocol_ec25519_fhmqvc_handshake_init, .handshake_handle = fastd_protocol_ec25519_fhmqvc_handshake_handle, diff --git a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h index fb07d19..b0101ac 100644 --- a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h +++ b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h @@ -102,7 +102,7 @@ struct fastd_protocol_peer_state { bool fastd_protocol_ec25519_fhmqvc_peer_check(fastd_peer_config_t *peer_conf); -bool fastd_protocol_ec25519_fhmqvc_peer_check_temporary(fastd_peer_t *peer); +bool fastd_protocol_ec25519_fhmqvc_peer_check_dynamic(fastd_peer_t *peer); void fastd_protocol_ec25519_fhmqvc_maintenance(void); void fastd_protocol_ec25519_fhmqvc_init_peer_state(fastd_peer_t *peer); diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c index 68c37d2..7fcc40c 100644 --- a/src/protocols/ec25519_fhmqvc/handshake.c +++ b/src/protocols/ec25519_fhmqvc/handshake.c @@ -540,12 +540,12 @@ void fastd_protocol_ec25519_fhmqvc_handshake_init(fastd_socket_t *sock, const fa fastd_send_handshake(sock, local_addr, remote_addr, peer, buffer); } -/** Checks if a temporary peer (added after an on-verify command) can stay after new peers have been configured */ -bool fastd_protocol_ec25519_fhmqvc_peer_check_temporary(fastd_peer_t *peer) { +/** Checks if a dynamic peer (added after an on-verify command) can stay after new peers have been configured */ +bool fastd_protocol_ec25519_fhmqvc_peer_check_dynamic(fastd_peer_t *peer) { if (key_count(peer->protocol_config->public_key.u8)) { char buf[65]; hexdump(buf, peer->protocol_config->public_key.u8); - pr_info("key %s is configured now, deleting temporary peer.", buf); + pr_info("key %s is configured now, deleting dynamic peer.", buf); return false; } @@ -560,8 +560,8 @@ typedef struct verify_data { aligned_int256_t peer_handshake_key; /**< The public key of the peer being verified */ } verify_data_t; -/** Adds a temporary peer for an unknown key */ -static fastd_peer_t * add_temporary(fastd_socket_t *sock, const fastd_peer_address_t *addr, const unsigned char key[PUBLICKEYBYTES]) { +/** Adds a dynamic peer for an unknown key */ +static fastd_peer_t * add_dynamic(fastd_socket_t *sock, const fastd_peer_address_t *addr, const unsigned char key[PUBLICKEYBYTES]) { if (!fastd_allow_verify()) { pr_debug("ignoring handshake from %I (unknown key)", addr); return NULL; @@ -589,8 +589,8 @@ static fastd_peer_t * add_temporary(fastd_socket_t *sock, const fastd_peer_addre return peer; } -/** Is called when a handshake from a temporary peer is received */ -static bool handle_temporary(fastd_socket_t *sock, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *remote_addr, +/** Is called when a handshake from a dynamic peer is received */ +static bool handle_dynamic(fastd_socket_t *sock, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *remote_addr, fastd_peer_t *peer, const fastd_handshake_t *handshake, const fastd_method_info_t *method) { if (handshake->type > 2 || !fastd_timed_out(&peer->verify_timeout)) return !fastd_timed_out(&peer->verify_valid_timeout); @@ -629,8 +629,8 @@ void fastd_protocol_ec25519_fhmqvc_handle_verify_return(fastd_peer_t *peer, fast #else -/** Dummy add temporary function for fastd versions without on-verify support */ -static inline fastd_peer_t * add_temporary(fastd_socket_t *sock UNUSED, const fastd_peer_address_t *addr, const unsigned char key[PUBLICKEYBYTES] UNUSED) { +/** Dummy add dynamic function for fastd versions without on-verify support */ +static inline fastd_peer_t * add_dynamic(fastd_socket_t *sock UNUSED, const fastd_peer_address_t *addr, const unsigned char key[PUBLICKEYBYTES] UNUSED) { pr_debug("ignoring handshake from %I (unknown key)", addr); return NULL; } @@ -656,7 +656,7 @@ void fastd_protocol_ec25519_fhmqvc_handshake_handle(fastd_socket_t *sock, const return; case ENOENT: - peer = add_temporary(sock, remote_addr, handshake->records[RECORD_SENDER_KEY].data); + peer = add_dynamic(sock, remote_addr, handshake->records[RECORD_SENDER_KEY].data); if (peer) break; @@ -690,8 +690,8 @@ void fastd_protocol_ec25519_fhmqvc_handshake_handle(fastd_socket_t *sock, const } #ifdef WITH_VERIFY - if (fastd_peer_is_temporary(peer)) { - if (!handle_temporary(sock, local_addr, remote_addr, peer, handshake, method)) + if (fastd_peer_is_dynamic(peer)) { + if (!handle_dynamic(sock, local_addr, remote_addr, peer, handshake, method)) return; } #endif diff --git a/src/protocols/ec25519_fhmqvc/util.c b/src/protocols/ec25519_fhmqvc/util.c index e4a0c08..2aea52d 100644 --- a/src/protocols/ec25519_fhmqvc/util.c +++ b/src/protocols/ec25519_fhmqvc/util.c @@ -92,7 +92,7 @@ void fastd_protocol_ec25519_fhmqvc_set_shell_env(fastd_shell_env_t *env, const f /** Generates a protocol-specific string representation of a peer - This will only be used for peers without names (e.g. temporary peers) and + This will only be used for peers without names (e.g. dynamic peers) and creates a string containing the first 16 hexadecimal digits of the peer's public key. */ |