+Mon Nov 26 15:01:53 CET 2001 Pekka Riikonen <priikone@silcnet.org>
+
+ * If client entry is deleted with active key agreement
+ session, abort the session.
+
+ The silc_client_abort_key_agreement now calls the completion
+ callback with new SILC_KEY_AGREEMENT_ABORTED status.
+
+ Affected file lib/silcclient/silcapi.h, client_keyagr.c and
+ idlist.c.
+
Sun Nov 25 18:01:45 EET 2001 Pekka Riikonen <priikone@silcnet.org>
* Don't use __restrict in older GCC's. Affected file is
assert(client_entry);
if (client_entry->ke) {
+ SilcClientKeyAgreement ke;
+
if (client_entry->ke->sock) {
silc_client_del_socket(client_entry->ke->client, client_entry->ke->sock);
silc_socket_free(client_entry->ke->sock);
}
- client_entry->ke = NULL;
silc_schedule_task_del_by_fd(client->schedule, client_entry->ke->fd);
if (client_entry->ke->timeout)
silc_schedule_task_del(client->schedule,
- client_entry->ke->timeout);
- silc_free(client_entry->ke);
+ client_entry->ke->timeout);
+ ke = client_entry->ke;
+ client_entry->ke = NULL;
+ ke->completion(client, conn, client_entry,
+ SILC_KEY_AGREEMENT_ABORTED, NULL, ke->context);
+ silc_free(ke);
}
}
silc_cipher_free(client_entry->receive_key);
silc_free(client_entry->key);
silc_client_ftp_session_free_client(conn, client_entry);
+ if (client_entry->ke)
+ silc_client_abort_key_agreement(client, conn, client_entry);
silc_free(client_entry);
}
SILC_KEY_AGREEMENT_ERROR, /* Unknown error occurred */
SILC_KEY_AGREEMENT_FAILURE, /* The protocol failed */
SILC_KEY_AGREEMENT_TIMEOUT, /* The protocol timeout */
+ SILC_KEY_AGREEMENT_ABORTED, /* The protocol aborted */
} SilcKeyAgreementStatus;
/***/
* before the key agreement protocol has been performed. After it has
* been performed the library will automatically unbind the port. The
* `client_entry' is the client to which we sent the key agreement
- * request.
+ * request. The key agreement completion callback will be called
+ * with SILC_KEY_AGREEMENT_ABORTED status.
*
***/
void silc_client_abort_key_agreement(SilcClient client,