X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fprotocol_auth.c;h=1fb37fcfa95eacb87bd713e0ea2feabd8463dd5f;hb=6e80da3370249caa1082c23c3ef55f338d1e9e74;hp=291c4b0176f02a25978924551f9c0d66fb98e0b7;hpb=1b8f8918360b40a2749d40355266ed7dedbe41b5;p=tinc diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 291c4b01..1fb37fcf 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -40,6 +40,8 @@ bool send_id(connection_t *c) { cp(); + gettimeofday(&c->start, NULL); + return send_request(c, "%d %s %d", ID, myself->connection->name, myself->connection->protocol_version); } @@ -205,7 +207,7 @@ bool metakey_h(connection_t *c, char *request) { /* Decrypt the meta key */ if(!rsa_private_decrypt(&myself->connection->rsa, enckey, len, key)) { - logger(LOG_ERR, _("Error during encryption of meta key for %s (%s)"), c->name, c->hostname); + logger(LOG_ERR, _("Error during decryption of meta key for %s (%s)"), c->name, c->hostname); return false; } @@ -333,6 +335,7 @@ bool chal_reply_h(connection_t *c, char *request) { */ free(c->hischallenge); + c->hischallenge = NULL; c->allow_request = ACK; return send_ack(c);