X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Firssi%2Fsrc%2Fsilc%2Fcore%2Fsilc-channels.c;h=4bd4e49ef556fb0d8a464fb930f8f014028eafa7;hb=HEAD;hp=106ff70647242928b51d8fbf4749c91a122f2a4c;hpb=8253c204da3d18b22347f298287206f6969aa898;p=silc.git diff --git a/apps/irssi/src/silc/core/silc-channels.c b/apps/irssi/src/silc/core/silc-channels.c index 106ff706..4bd4e49e 100644 --- a/apps/irssi/src/silc/core/silc-channels.c +++ b/apps/irssi/src/silc/core/silc-channels.c @@ -747,6 +747,7 @@ static void command_key(const char *data, SILC_SERVER_REC *server, if (!ckeys) goto out; + silc_dlist_start(ckeys); if (!number || number > silc_dlist_count(ckeys)) { silc_dlist_uninit(ckeys); goto out; @@ -858,6 +859,7 @@ static void command_key(const char *data, SILC_SERVER_REC *server, if (!ckeys) goto out; + silc_dlist_start(ckeys); while ((ch = silc_dlist_get(ckeys))) { memset(buf, 0, sizeof(buf)); strncat(buf, " ", 2); @@ -961,6 +963,7 @@ static void command_key(const char *data, SILC_SERVER_REC *server, if (!ckeys) goto out; + silc_dlist_start(ckeys); if (argc == 4) { chanrec->cur_key++; if (chanrec->cur_key >= silc_dlist_count(ckeys)) @@ -1071,7 +1074,8 @@ void silc_list_key(const char *pub_filename, int verbose) 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); @@ -1086,10 +1090,12 @@ void silc_list_key(const char *pub_filename, int verbose) 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);