SilcClientConnection conn = cmd->conn;
SilcClientCommandReplyContext reply =
(SilcClientCommandReplyContext)context2;
- SilcCommandStatus status;
+ SilcCommandStatus status = silc_command_get_status(reply->payload);
- SILC_GET16_MSB(status, silc_argument_get_arg_type(reply->args, 1, NULL));
if (status == SILC_STATUS_OK) {
/* Set the nickname */
silc_idcache_del_by_context(conn->client_cache, conn->local_entry);
SilcClientCommandContext cmd = (SilcClientCommandContext)context;
SilcClientCommandReplyContext reply =
(SilcClientCommandReplyContext)context2;
- SilcCommandStatus status;
+ SilcCommandStatus status = silc_command_get_status(reply->payload);
- SILC_GET16_MSB(status, silc_argument_get_arg_type(reply->args, 1, NULL));
if (status == SILC_STATUS_OK) {
/* Remove with timeout */
silc_schedule_task_add(cmd->client->schedule, cmd->conn->sock->sock,
if (!strcasecmp(cmd->argv[i + 1], "-pubkey")) {
auth = silc_auth_public_key_auth_generate(cmd->client->public_key,
cmd->client->private_key,
- conn->hash,
+ cmd->client->rng, conn->hash,
conn->local_id,
SILC_ID_CLIENT);
} else {
if (!strcasecmp(cmd->argv[3], "-pubkey")) {
auth = silc_auth_public_key_auth_generate(cmd->client->public_key,
cmd->client->private_key,
+ cmd->client->rng,
conn->hash,
conn->local_id,
SILC_ID_CLIENT);
if (!strcasecmp(cmd->argv[4], "-pubkey")) {
auth = silc_auth_public_key_auth_generate(cmd->client->public_key,
cmd->client->private_key,
+ cmd->client->rng,
conn->hash,
conn->local_id,
SILC_ID_CLIENT);
/* Encode the public key authentication payload */
auth = silc_auth_public_key_auth_generate(cmd->client->public_key,
cmd->client->private_key,
- conn->hash,
+ cmd->client->rng, conn->hash,
conn->local_id,
SILC_ID_CLIENT);
} else {
/* Encode the public key authentication payload */
auth = silc_auth_public_key_auth_generate(cmd->client->public_key,
cmd->client->private_key,
- conn->hash,
+ cmd->client->rng, conn->hash,
conn->local_id,
SILC_ID_CLIENT);
} else {
} else {
SilcClientCommandReplyContext reply =
(SilcClientCommandReplyContext)context2;
- SilcCommandStatus status;
- unsigned char *tmp = silc_argument_get_arg_type(reply->args, 1, NULL);
- SILC_GET16_MSB(status, tmp);
+ SilcCommandStatus status = silc_command_get_status(reply->payload);
/* If nickname was not found, then resolve the server. */
if (status == SILC_STATUS_ERR_NO_SUCH_NICK) {