+/* Signature callback */
+
+static void silc_client_command_kill_signed(const SilcBuffer buffer,
+ void *context)
+{
+ SilcClientCommandContext cmd = context;
+
+ if (!buffer) {
+ silc_fsm_finish(&cmd->thread);
+ return;
+ }
+
+ silc_fsm_set_state_context(&cmd->thread, buffer);
+ SILC_FSM_CALL_CONTINUE_SYNC(&cmd->thread);
+}
+
+/* Send KILL command */
+
+SILC_FSM_STATE(silc_client_command_kill_send)
+{
+ SilcClientCommandContext cmd = fsm_context;
+ SilcClientConnection conn = cmd->conn;
+ SilcClient client = conn->client;
+ SilcBuffer idp, auth = state_context;
+ SilcClientEntry target = cmd->context;
+ char *comment = NULL;
+
+ if (cmd->argc >= 3)
+ if (strcasecmp(cmd->argv[2], "-pubkey"))
+ comment = cmd->argv[2];
+
+ /* Send the KILL command to the server */
+ idp = silc_id_payload_encode(&target->id, SILC_ID_CLIENT);
+ silc_client_command_send_va(conn, cmd, cmd->cmd, NULL, NULL, 3,
+ 1, silc_buffer_datalen(idp),
+ 2, comment, comment ? strlen(comment) : 0,
+ 3, silc_buffer_datalen(auth));
+
+ silc_buffer_free(idp);
+ silc_client_unref_client(client, conn, target);
+
+ /* Notify application */
+ COMMAND(SILC_STATUS_OK);
+
+ /** Wait for command reply */
+ silc_fsm_next(fsm, silc_client_command_reply_wait);
+ return SILC_FSM_CONTINUE;
+}