protocol.c
- Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+ Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2003 Pekka Riikonen
+ Copyright (C) 1997 - 2004 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
*/
-/*
- * Client side of the protocols.
- */
/* $Id$ */
#include "silcincludes.h"
*/
unsigned char *auth_data = NULL;
SilcUInt32 auth_data_len = 0;
- unsigned char sign[1024];
+ unsigned char sign[2048 + 1];
switch(ctx->auth_meth) {
case SILC_AUTH_NONE:
*/
/* Send the REKEY_DONE to indicate we will take new keys into use */
+ silc_client_packet_queue_purge(client, ctx->sock);
silc_client_packet_send(client, ctx->sock,
SILC_PACKET_REKEY_DONE,
NULL, 0, NULL, NULL, NULL, 0, FALSE);
/* Send the REKEY_DONE to indicate we will take new keys into use
now. */
+ silc_client_packet_queue_purge(client, ctx->sock);
silc_client_packet_send(client, ctx->sock,
SILC_PACKET_REKEY_DONE,
NULL, 0, NULL, NULL, NULL, 0, FALSE);
/* Send the REKEY_DONE to indicate we will take new keys into use
now. */
+ silc_client_packet_queue_purge(client, ctx->sock);
silc_client_packet_send(client, ctx->sock, SILC_PACKET_REKEY_DONE,
NULL, 0, NULL, NULL, NULL, 0, FALSE);
key to the new key since all packets after this packet must
encrypted with the new key. */
silc_client_protocol_rekey_generate_pfs(client, ctx, TRUE);
+ silc_client_packet_queue_purge(client, ctx->sock);
/* The protocol ends in next stage. */
protocol->state = SILC_PROTOCOL_STATE_END;
silc_client_protocol_rekey_generate_pfs(client, ctx, FALSE);
else
silc_client_protocol_rekey_generate(client, ctx, FALSE);
+ silc_client_packet_queue_purge(client, ctx->sock);
/* Protocol has ended, call the final callback */
if (protocol->final_callback)