/* Send the packet immediately */
silc_client_packet_send(client, ctx->sock, type, NULL, 0, NULL, NULL,
- packet->data, packet->len, TRUE);
+ packet->data, packet->len, FALSE);
}
/* Performs re-key as defined in the SILC protocol specification. */
/* Start the re-key by sending the REKEY packet */
silc_client_packet_send(client, ctx->sock, SILC_PACKET_REKEY,
- NULL, 0, NULL, NULL, NULL, 0, TRUE);
+ NULL, 0, NULL, NULL, NULL, 0, FALSE);
if (ctx->pfs == TRUE) {
/*
* Do normal and simple re-key.
*/
- /* The protocol ends in next stage. We have sent the REKEY packet
- and now we just wait that the responder send REKEY_DONE and
- the we'll generate the new key, simple. */
+ /* Send the REKEY_DONE to indicate we will take new keys into use
+ now. */
+ silc_client_packet_send(client, ctx->sock,
+ SILC_PACKET_REKEY_DONE,
+ NULL, 0, NULL, NULL, NULL, 0, FALSE);
+
+ /* The protocol ends in next stage. */
protocol->state = SILC_PROTOCOL_STATE_END;
}
}
protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 0);
}
- if (ctx->responder == FALSE) {
- if (ctx->pfs == FALSE) {
- /* Send the REKEY_DONE to indicate we will take new keys into use
- now. */
- silc_client_packet_send(client, ctx->sock,
- SILC_PACKET_REKEY_DONE,
- NULL, 0, NULL, NULL, NULL, 0, FALSE);
- }
- }
-
/* Protocol has ended, call the final callback */
if (protocol->final_callback)
protocol->execute_final(client->timeout_queue, 0, protocol, fd);