if (!ckeys)
goto out;
+ silc_dlist_start(ckeys);
if (!number || number > silc_dlist_count(ckeys)) {
silc_dlist_uninit(ckeys);
goto out;
if (!ckeys)
goto out;
+ silc_dlist_start(ckeys);
while ((ch = silc_dlist_get(ckeys))) {
memset(buf, 0, sizeof(buf));
strncat(buf, " ", 2);
- len = strlen(silc_cipher_get_name(ch->cipher));
- strncat(buf, silc_cipher_get_name(ch->cipher),
+ len = strlen(silc_cipher_get_name(ch->send_key));
+ strncat(buf, silc_cipher_get_name(ch->send_key),
len > 16 ? 16 : len);
if (len < 16)
for (i = 0; i < 16 - len; i++)
if (!ckeys)
goto out;
+ silc_dlist_start(ckeys);
if (argc == 4) {
chanrec->cur_key++;
if (chanrec->cur_key >= silc_dlist_count(ckeys))
SilcUInt32 key_len = 0;
int is_server_key = (strstr(pub_filename, "serverkeys") != NULL);
- if (!silc_pkcs_load_public_key((char *)pub_filename, &public_key)) {
+ if (!silc_pkcs_load_public_key((char *)pub_filename, SILC_PKCS_ANY,
+ &public_key)) {
printformat_module("fe-common/silc", NULL, NULL,
MSGLEVEL_CRAP, SILCTXT_LISTKEY_LOADPUB,
pub_filename);
return;
}
- silc_pubkey = silc_pkcs_get_context(SILC_PKCS_SILC, public_key);
+ silc_pubkey = silc_pkcs_public_key_get_pkcs(SILC_PKCS_SILC, public_key);
ident = &silc_pubkey->identifier;
- pk = silc_pkcs_public_key_encode(public_key, &pk_len);
+ pk = silc_pkcs_public_key_encode(NULL, public_key, &pk_len);
+ if (!pk)
+ return;
fingerprint = silc_hash_fingerprint(NULL, pk, pk_len);
babbleprint = silc_hash_babbleprint(NULL, pk, pk_len);
key_len = silc_pkcs_public_key_get_len(public_key);