From df48485aeab897c50fd792a740d1a5aed4378fc9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 18 Oct 2015 02:57:26 +0200 Subject: peer_group: move to a new header, add recursive lookup macros --- src/protocols/ec25519_fhmqvc/handshake.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/protocols/ec25519_fhmqvc/handshake.c') diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c index 0cbe15a..80dbd5c 100644 --- a/src/protocols/ec25519_fhmqvc/handshake.c +++ b/src/protocols/ec25519_fhmqvc/handshake.c @@ -33,6 +33,7 @@ #include "../../crypto.h" #include "../../handshake.h" #include "../../hkdf_sha256.h" +#include "../../peer_group.h" #include "../../verify.h" @@ -314,7 +315,7 @@ static void respond_handshake(const fastd_socket_t *sock, const fastd_peer_addre if (!update_shared_handshake_key(peer, handshake_key, peer_handshake_key)) return; - fastd_handshake_buffer_t buffer = fastd_handshake_new_reply(2, little_endian, fastd_peer_get_mtu(peer), method, fastd_peer_get_methods(peer), 4*(4+PUBLICKEYBYTES) + 2*(4+HASHBYTES)); + fastd_handshake_buffer_t buffer = fastd_handshake_new_reply(2, little_endian, fastd_peer_get_mtu(peer), method, *fastd_peer_group_lookup_peer(peer, methods), 4*(4+PUBLICKEYBYTES) + 2*(4+HASHBYTES)); fastd_handshake_add(&buffer, RECORD_SENDER_KEY, PUBLICKEYBYTES, &conf.protocol_config->key.public); fastd_handshake_add(&buffer, RECORD_RECIPIENT_KEY, PUBLICKEYBYTES, &peer->key->key); -- cgit v1.2.3