From: Pekka Riikonen Date: Wed, 16 May 2007 16:53:11 +0000 (+0000) Subject: Fixed channel private key listing. X-Git-Tag: silc.toolkit.1.1.beta3~5 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=3c444caff2bd292df7044434b1983a07641daf98 Fixed channel private key listing. --- diff --git a/CHANGES b/CHANGES index d68f8cfa..52639a95 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,14 @@ +Wed May 16 18:59:22 EEST 2007 Pekka Riikonen + + * Fixed channel private key listing with /key. Affected file + is apps/irssi/src/silc/core/silc-channels.c. + + * Fixed the public headers from anonymous structures. Affected + files are lib/. + + * Changed silc_buffer_*len macros to inline functions. Affected + file is lib/silcutil/silcbuffer.h. + Wed May 16 10:21:45 EEST 2007 Pekka Riikonen * Fixed nickname format parsing in JOIN notify handling and diff --git a/TODO b/TODO index 9603ac46..b091bdb4 100644 --- a/TODO +++ b/TODO @@ -42,11 +42,6 @@ SILC Client ****PARTLY DONE**** o Improve help files, especially /cmode, /cumode and /key. - o /listkeys crash when silc_pkcs_public_key_encode returns NULL. - - o /key channel * list doesn't return aything when key is set and user - got "Private key set to channel xxx". - lib/silcclient, The Client Library ***PARTLY DONE**** ================================== diff --git a/apps/irssi/src/silc/core/silc-channels.c b/apps/irssi/src/silc/core/silc-channels.c index 106ff706..1c6bb8d9 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)) @@ -1090,6 +1093,8 @@ void silc_list_key(const char *pub_filename, int verbose) ident = &silc_pubkey->identifier; pk = silc_pkcs_public_key_encode(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);