static void silc_client_keyagr_verify_key_cb(SilcBool success, void *context)
{
- VerifyKeyContext verify = context;
+ SilcVerifyKeyContext verify = context;
/* Call the completion callback back to the SKE */
verify->completion(verify->ske, success ? SILC_SKE_STATUS_OK :
SilcClientKeyAgreement ke = client_entry->internal.ke;
SilcClientConnection conn = ke->conn;
SilcClient client = conn->client;
- VerifyKeyContext verify;
+ SilcVerifyKeyContext verify;
/* If we provided repository for SKE and we got here the key was not
found from the repository. */
if (packet->src_id_type != SILC_ID_CLIENT) {
/** Invalid packet */
silc_fsm_next(fsm, silc_client_key_agreement_error);
- SILC_FSM_CONTINUE;
+ return SILC_FSM_CONTINUE;
}
if (!silc_id_str2id(packet->src_id, packet->src_id_len, SILC_ID_CLIENT,
&remote_id, sizeof(remote_id))) {
/** Invalid source ID */
silc_fsm_next(fsm, silc_client_key_agreement_error);
- SILC_FSM_CONTINUE;
+ return SILC_FSM_CONTINUE;
}
/* Check whether we know this client already */
remote_client = silc_client_get_client_by_id(client, conn, &remote_id);
- if (!remote_client || !remote_client->nickname[0]) {
+ if (!remote_client || !remote_client->internal.valid) {
/** Resolve client info */
silc_client_unref_client(client, conn, remote_client);
SILC_FSM_CALL(silc_client_get_client_by_id_resolve(
/** Malformed Payload */
SILC_LOG_DEBUG(("Malformed key agreement payload"));
silc_fsm_next(fsm, silc_client_key_agreement_error);
- SILC_FSM_CONTINUE;
+ return SILC_FSM_CONTINUE;
}
/* If remote did not provide connection endpoint, we will assume that we
silc_key_agreement_payload_free(payload);
silc_packet_free(packet);
- SILC_FSM_FINISH;
+ return SILC_FSM_FINISH;
}
/* Key agreement packet processing error */
{
SilcPacket packet = state_context;
silc_packet_free(packet);
- SILC_FSM_FINISH;
+ return SILC_FSM_FINISH;
}