diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-10-18 02:57:26 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-10-18 03:04:02 +0200 |
commit | df48485aeab897c50fd792a740d1a5aed4378fc9 (patch) | |
tree | 2de6c9e4847a54e0798a38a7976dc2a5ac89c7c3 /src/protocols | |
parent | d9a5267fceca6f46ee3005f7624fa92786a3c9b1 (diff) | |
download | fastd-df48485aeab897c50fd792a740d1a5aed4378fc9.tar fastd-df48485aeab897c50fd792a740d1a5aed4378fc9.zip |
peer_group: move to a new header, add recursive lookup macros
Diffstat (limited to 'src/protocols')
-rw-r--r-- | src/protocols/ec25519_fhmqvc/handshake.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |