X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_auth.c;fp=src%2Fprotocol_auth.c;h=6a7a9196f4d18854271015f57e3593e4683870af;hb=ad2e8db4730e3c4355db2cea911422e7efd6a1ee;hp=263a131729f29ae7b27d03bfbe21f08f9d7e83cd;hpb=84b24109000ce66125038793df313205e5836b83;p=tinc diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 263a1317..6a7a9196 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -359,7 +359,17 @@ bool id_h(connection_t *c, const char *request) { c->protocol_minor = 2; - return sptps_start(&c->sptps, c, false, false, invitation_key, c->ecdsa, "tinc invitation", 15, send_meta_sptps, receive_invitation_sptps); + sptps_params_t params = { + .handle = c, + .initiator = false, + .mykey = invitation_key, + .hiskey = c->ecdsa, + .label = "tinc invitation", + .send_data = send_meta_sptps, + .receive_record = receive_invitation_sptps, + }; + + return sptps_start(&c->sptps, ¶ms); } /* Check if identity is a valid name */ @@ -454,7 +464,18 @@ bool id_h(connection_t *c, const char *request) { snprintf(label, labellen, "tinc TCP key expansion %s %s", c->name, myself->name); } - return sptps_start(&c->sptps, c, c->outgoing, false, myself->connection->ecdsa, c->ecdsa, label, labellen, send_meta_sptps, receive_meta_sptps); + sptps_params_t params = { + .handle = c, + .initiator = c->outgoing, + .mykey = myself->connection->ecdsa, + .hiskey = c->ecdsa, + .label = label, + .labellen = sizeof(label), + .send_data = send_meta_sptps, + .receive_record = receive_meta_sptps, + }; + + return sptps_start(&c->sptps, ¶ms); } else { return send_metakey(c); }