SilcServerConfigAdmin *admin;
SilcIDListData idata = (SilcIDListData)client;
bool result = FALSE;
+ SilcPublicKey cached_key;
SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_OPER, cmd, 1, 2);
result = silc_auth_verify_data(auth, tmp_len, SILC_AUTH_PASSWORD,
admin->passphrase, admin->passphrase_len,
idata->hash, client->id, SILC_ID_CLIENT);
- if (!result && admin->publickey)
+ if (!result && admin->publickeys) {
+ cached_key = silc_server_get_public_key(server, admin->publickeys);
+ if (!cached_key)
+ goto out;
result = silc_auth_verify_data(auth, tmp_len, SILC_AUTH_PUBLIC_KEY,
- admin->publickey, 0,
- idata->hash, client->id, SILC_ID_CLIENT);
+ cached_key, 0, idata->hash,
+ client->id, SILC_ID_CLIENT);
+ }
if (!result) {
/* Authentication failed */
silc_server_command_send_status_reply(cmd, SILC_COMMAND_OPER,
SilcServerConfigAdmin *admin;
SilcIDListData idata = (SilcIDListData)client;
bool result = FALSE;
+ SilcPublicKey cached_key;
SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_SILCOPER, cmd, 1, 2);
result = silc_auth_verify_data(auth, tmp_len, SILC_AUTH_PASSWORD,
admin->passphrase, admin->passphrase_len,
idata->hash, client->id, SILC_ID_CLIENT);
- if (!result && admin->publickey)
+ if (!result && admin->publickeys) {
+ cached_key = silc_server_get_public_key(server, admin->publickeys);
+ if (!cached_key)
+ goto out;
result = silc_auth_verify_data(auth, tmp_len, SILC_AUTH_PUBLIC_KEY,
- admin->publickey, 0,
- idata->hash, client->id, SILC_ID_CLIENT);
+ cached_key, 0, idata->hash,
+ client->id, SILC_ID_CLIENT);
+ }
if (!result) {
/* Authentication failed */
silc_server_command_send_status_reply(cmd, SILC_COMMAND_OPER,