From e664adaaed6f162ca7af7eb3329ae63cecfd1fa5 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 16 Mar 2002 19:09:33 +0000 Subject: [PATCH] updates. --- CHANGES | 7 ++++++ TODO | 5 +--- apps/irssi/src/silc/core/client_ops.c | 6 +++-- doc/draft-riikonen-silc-ke-auth-05.nroff | 6 +++-- doc/draft-riikonen-silc-spec-05.nroff | 6 ++--- lib/silcclient/client_notify.c | 31 ++++++++++++------------ lib/silcutil/silclog.h | 2 +- lib/silcutil/silcnet.h | 2 +- 8 files changed, 36 insertions(+), 29 deletions(-) diff --git a/CHANGES b/CHANGES index 90cf5470..dd539bb1 100644 --- a/CHANGES +++ b/CHANGES @@ -30,6 +30,13 @@ Sat Mar 16 18:04:30 EET 2002 Pekka Riikonen lib/silccrypt/silccipher.c, silchash.c, silchmac.c and silcpkcs.c. + * Fixed the handling of third parameter of KICKED notify, since + it was mistakenly updated to SILC Protocol 1.0 even though it + is to be included in 1.1. Since it is not in 1.0 it is not + mandatory, and this fix now handles it only if it is provided, + and it is not error if it is not provided. Affected file + lib/silcclient/client_notify.c. + Sat Mar 16 09:07:27 EET 2002 Pekka Riikonen * Handled CHANNEL_CHANGE notify (ignore it) in Irssi SILC diff --git a/TODO b/TODO index e4ff0f1b..e186dfc5 100644 --- a/TODO +++ b/TODO @@ -105,7 +105,7 @@ Manual. o Write "Platform Implementations" document to describe what platforms Toolkit support, what has been implemented, what has not been, what - wors differently etc. + works differently etc. TODO in SILC Protocol @@ -187,8 +187,5 @@ describe new stuff to be added to protocol versions 1.x. the receiver may not accept the key in the payload, and to describe other means of distributing a key. - 12. The router to router connection diagram in spec-xx is showing the - primary routers direction to wrong direction. Swap it. - 13. Add the killer's client ID to the KILLED notify. To be included in protocol version 1.1. diff --git a/apps/irssi/src/silc/core/client_ops.c b/apps/irssi/src/silc/core/client_ops.c index ed698b9b..c7d769bc 100644 --- a/apps/irssi/src/silc/core/client_ops.c +++ b/apps/irssi/src/silc/core/client_ops.c @@ -459,7 +459,8 @@ void silc_notify(SilcClient client, SilcClientConnection conn, if (client_entry == conn->local_entry) { printformat_module("fe-common/silc", server, channel->channel_name, MSGLEVEL_CRAP, SILCTXT_CHANNEL_KICKED_YOU, - channel->channel_name, client_entry2->nickname, + channel->channel_name, + client_entry ? client_entry2->nickname : "", tmp ? tmp : ""); if (chanrec) { chanrec->kicked = TRUE; @@ -469,7 +470,8 @@ void silc_notify(SilcClient client, SilcClientConnection conn, printformat_module("fe-common/silc", server, channel->channel_name, MSGLEVEL_CRAP, SILCTXT_CHANNEL_KICKED, client_entry->nickname, channel->channel_name, - client_entry2->nickname, tmp ? tmp : ""); + client_entry2 ? client_entry2->nickname : "", + tmp ? tmp : ""); if (chanrec) { SILC_NICK_REC *nickrec = silc_nicklist_find(chanrec, client_entry); diff --git a/doc/draft-riikonen-silc-ke-auth-05.nroff b/doc/draft-riikonen-silc-ke-auth-05.nroff index 8e95e13d..846d7689 100644 --- a/doc/draft-riikonen-silc-ke-auth-05.nroff +++ b/doc/draft-riikonen-silc-ke-auth-05.nroff @@ -875,8 +875,10 @@ authentication is required. If authentication method is passphrase the authentication data is plaintext passphrase. As the payload is entirely encrypted it is safe -to have plaintext passphrase. See the section 3.2.1 Passphrase -Authentication for more information. +to have plaintext passphrase. It is also provided as plaintext passphrase +because the receiver may need to pass the entire passphrase into a +passphrase checker, and hash digest of the passphrase would prevent this. +See the section 3.2.1 Passphrase Authentication for more information. If authentication method is public key authentication the authentication data is a signature of the hash value of hash HASH plus Key Exchange diff --git a/doc/draft-riikonen-silc-spec-05.nroff b/doc/draft-riikonen-silc-spec-05.nroff index c80d6500..682e215a 100644 --- a/doc/draft-riikonen-silc-spec-05.nroff +++ b/doc/draft-riikonen-silc-spec-05.nroff @@ -389,10 +389,10 @@ Example with three routers in the network: .in 16 .nf - S/R1 - > - > - > - > - > - > - S/R2 + S/R1 - < - < - < - < - < - < - S/R2 \\ / - ^ v - \\ - < - < - S/R3 - < - < - / + v ^ + \\ - > - > - S/R3 - > - > - / .in 3 diff --git a/lib/silcclient/client_notify.c b/lib/silcclient/client_notify.c index 862d957a..28982fa2 100644 --- a/lib/silcclient/client_notify.c +++ b/lib/silcclient/client_notify.c @@ -99,8 +99,8 @@ void silc_client_notify_by_server(SilcClient client, SilcClientID *client_id = NULL; SilcChannelID *channel_id = NULL; SilcServerID *server_id = NULL; - SilcClientEntry client_entry; - SilcClientEntry client_entry2; + SilcClientEntry client_entry = NULL; + SilcClientEntry client_entry2 = NULL; SilcChannelEntry channel; SilcChannelUser chu; SilcServerEntry server; @@ -744,21 +744,20 @@ void silc_client_notify_by_server(SilcClient client, /* Get the kicker */ tmp = silc_argument_get_arg_type(args, 3, &tmp_len); - if (!tmp) - goto out; - - client_id = silc_id_payload_parse_id(tmp, tmp_len); - if (!client_id) - goto out; + if (tmp) { + client_id = silc_id_payload_parse_id(tmp, tmp_len); + if (!client_id) + goto out; - /* Find kicker's client entry and if not found resolve it */ - client_entry2 = silc_client_get_client_by_id(client, conn, client_id); - if (!client_entry2) { - silc_client_notify_by_server_resolve(client, conn, packet, client_id); - goto out; - } else { - if (client_entry2 != conn->local_entry) - silc_client_nickname_format(client, conn, client_entry2); + /* Find kicker's client entry and if not found resolve it */ + client_entry2 = silc_client_get_client_by_id(client, conn, client_id); + if (!client_entry2) { + silc_client_notify_by_server_resolve(client, conn, packet, client_id); + goto out; + } else { + if (client_entry2 != conn->local_entry) + silc_client_nickname_format(client, conn, client_entry2); + } } /* Get comment */ diff --git a/lib/silcutil/silclog.h b/lib/silcutil/silclog.h index 30d64eba..adad8ddd 100644 --- a/lib/silcutil/silclog.h +++ b/lib/silcutil/silclog.h @@ -220,7 +220,7 @@ extern DLLAPI bool silc_debug_hexdump; /* Macros */ -#ifdef WIN32 +#ifdef SILC_WIN32 #define __FUNCTION__ "" #endif diff --git a/lib/silcutil/silcnet.h b/lib/silcutil/silcnet.h index 262d86a9..16499098 100644 --- a/lib/silcutil/silcnet.h +++ b/lib/silcutil/silcnet.h @@ -418,7 +418,7 @@ char *silc_net_localhost(void); ***/ char *silc_net_localip(void); -#ifdef WIN32 +#ifdef SILC_WIN32 /****f* silcutil/SilcNetAPI/silc_net_win32_init * -- 2.24.0