updates.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 28 Feb 2001 19:09:35 +0000 (19:09 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 28 Feb 2001 19:09:35 +0000 (19:09 +0000)
CHANGES
apps/silcd/command.c
apps/silcd/testi2.conf
doc/example_silc.conf
doc/example_silcd.conf
lib/silcclient/client.c
lib/silcske/silcske.c

diff --git a/CHANGES b/CHANGES
index c97304a55f76848950fe85510fb64f7bdfca8e3b..bae2c482363ffad79d8864a93617dcc1764e5c82 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,13 @@
+Wed Feb 28 20:56:29 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Fixed a minor bug in the login when the channel key is
+         re-generated in the server.  It used to generate the key in
+         wrong order and thus caused problems in the channel traffic.
+
+       * Fixed a minor bug in channel key distsribution after
+         KICK command.  The key was not sent to the router even though
+         it should've been.
+
 Tue Feb 27 20:24:25 EET 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Added silc_ske_process_key_material_data as generic routine
index 2361f87fe565b1c6d9532c38c73c568f3a3a51b1..1e59ea7ff3c5929286547a00cd7257b76be83e2b 100644 (file)
@@ -1893,14 +1893,15 @@ static void silc_server_command_join_channel(SilcServer server,
   }
 
   /* Generate new channel key as protocol dictates */
-  if (!created || !channel->channel_key)
+  if ((!created && silc_list_count(channel->user_list) > 0) || 
+      !channel->channel_key)
     silc_server_create_channel_key(server, channel, 0);
 
   /* Send the channel key. This is broadcasted to the channel but is not
      sent to the client who is joining to the channel. */
   silc_server_send_channel_key(server, NULL, channel, 
                               server->server_type == SILC_ROUTER ? 
-                              FALSE : server->standalone);
+                              FALSE : !server->standalone);
 
   /* Join the client to the channel by adding it to channel's user list.
      Add also the channel to client entry's channels list for fast cross-
@@ -2962,7 +2963,7 @@ SILC_SERVER_CMD_FUNC(kick)
      to the client who joined the channel. */
   silc_server_send_channel_key(server, target_client->connection, channel, 
                               server->server_type == SILC_ROUTER ? 
-                              FALSE : server->standalone);
+                              FALSE : !server->standalone);
 
  out:
   silc_server_command_free(cmd);
@@ -2988,7 +2989,7 @@ SILC_SERVER_CMD_FUNC(connect)
   unsigned int tmp_len;
   unsigned int port = SILC_PORT;
 
-  SILC_SERVER_COMMAND_CHECK_ARGC(SILC_COMMAND_CONNECT, cmd, 0, 0);
+  SILC_SERVER_COMMAND_CHECK_ARGC(SILC_COMMAND_CONNECT, cmd, 1, 2);
 
   if (!client || cmd->sock->type != SILC_SOCKET_TYPE_CLIENT)
     goto out;
@@ -3048,7 +3049,7 @@ SILC_SERVER_CMD_FUNC(close)
   unsigned char *name;
   unsigned int port = SILC_PORT;
 
-  SILC_SERVER_COMMAND_CHECK_ARGC(SILC_COMMAND_CLOSE, cmd, 0, 0);
+  SILC_SERVER_COMMAND_CHECK_ARGC(SILC_COMMAND_CLOSE, cmd, 1, 2);
 
   if (!client || cmd->sock->type != SILC_SOCKET_TYPE_CLIENT)
     goto out;
index 674f0cfae991570b8f70204e5a5231be697aa98c..50064d06d312213d69701d4b9a19f14103d3e2f4 100644 (file)
@@ -3,7 +3,7 @@ aes-256-cbc:../lib/silcsim/modules/aes.sim.so:32:16
 aes-192-cbc:../lib/silcsim/modules/aes.sim.so:24:16
 aes-128-cbc:../lib/silcsim/modules/aes.sim.so:16:16
 twofish-256-cbc:../lib/silcsim/modules/twofish.sim.so:32:16
-twofish-192-cbc:../lib/silcsim/modules/twofish.sim.so:24:16  
+twofish-192-cbc:../lib/silcsim/modules/twofish.sim.so:24:16
 twofish-128-cbc:../lib/silcsim/modules/twofish.sim.so:16:16
 mars-256-cbc:../lib/silcsim/modules/mars.sim.so:32:16
 mars-192-cbc:../lib/silcsim/modules/mars.sim.so:24:16
@@ -25,10 +25,10 @@ nobody:nobody
 Mun huone:Mun servo:Pekka Riikonen:priikone@poseidon.pspt.fi
 
 [ServerInfo]
-lassi.kuo.fi.ssh.com:10.2.1.7:Kuopio, Finland:1334
+lassi.kuo.fi.ssh.com:212.146.42.253:Kuopio, Finland:1334
 
 [ListenPort]
-10.2.1.7:10.2.1.7:1334
+212.146.42.253:212.146.42.253:1334
 
 [Logging]
 infologfile:silcd2.log:10000
@@ -49,10 +49,10 @@ errorlogfile:silcd2.log:10000
 [AdminConnection]
 
 [ServerConnection]
-10.2.1.7:passwd:priikone:1333:1:1
+212.146.42.253:passwd:priikone:1333:1:1
 
 [RouterConnection]
-10.2.1.7:passwd:priikone:1335:1:1:0
+212.146.42.253:passwd:priikone:1335:1:1:0
 
 [DenyConnection]
 [RedirectClient]
index abdd4284b1a0639a0f7ad0dd14fde71f38489dc8..5949ca2a1a91ec70ef1a28e76adf53cdce79e746 100644 (file)
@@ -6,9 +6,9 @@
 # If the cipher is builtin the <module path> maybe omitted.
 #
 [cipher]
-rijndael-256-cbc:../lib/silcsim/modules/rijndael.sim.so:32:16
-rijndael-192-cbc:../lib/silcsim/modules/rijndael.sim.so:24:16
-rijndael-128-cbc:../lib/silcsim/modules/rijndael.sim.so:16:16
+aes-256-cbc:../lib/silcsim/modules/aes.sim.so:32:16
+aes-192-cbc:../lib/silcsim/modules/aes.sim.so:24:16
+aes-128-cbc:../lib/silcsim/modules/aes.sim.so:16:16
 twofish-256-cbc:../lib/silcsim/modules/twofish.sim.so:32:16
 twofish-192-cbc:../lib/silcsim/modules/twofish.sim.so:24:16
 twofish-128-cbc:../lib/silcsim/modules/twofish.sim.so:16:16
index 1aa5fc957d1f26d442caeda6beb19a9eae23343f..236e200ef44946966f8756f7df1beb5619125db1 100644 (file)
@@ -6,9 +6,9 @@
 # If the cipher is builtin the <module path> maybe omitted.
 #
 [Cipher]
-rijndael-256-cbc:../lib/silcsim/modules/rijndael.sim.so:32:16
-rijndael-192-cbc:../lib/silcsim/modules/rijndael.sim.so:24:16
-rijndael-128-cbc:../lib/silcsim/modules/rijndael.sim.so:16:16
+aes-256-cbc:../lib/silcsim/modules/aes.sim.so:32:16
+aes-192-cbc:../lib/silcsim/modules/aes.sim.so:24:16
+aes-128-cbc:../lib/silcsim/modules/aes.sim.so:16:16
 twofish-256-cbc:../lib/silcsim/modules/twofish.sim.so:32:16
 twofish-192-cbc:../lib/silcsim/modules/twofish.sim.so:24:16
 twofish-128-cbc:../lib/silcsim/modules/twofish.sim.so:16:16
index fe16923271e3e66a414e5e658cb6f6945b39bd97..32e0a32dadde308b06e00a80c93797ec68aff503 100644 (file)
@@ -992,7 +992,8 @@ void silc_client_send_channel_message(SilcClient client,
   /* Generate IV */
   block_len = silc_cipher_get_block_len(channel->channel_key);
   if (channel->iv[0] == '\0')
-    for (i = 0; i < block_len; i++) channel->iv[i] = silc_rng_get_byte(client->rng);
+    for (i = 0; i < block_len; i++) channel->iv[i] = 
+                                     silc_rng_get_byte(client->rng);
   else
     silc_hash_make(client->md5hash, channel->iv, block_len, channel->iv);
 
@@ -2076,6 +2077,8 @@ void silc_client_channel_message(SilcClient client,
   int found = FALSE;
   unsigned int block_len;
 
+  SILC_LOG_DEBUG(("Start"));
+
   /* Sanity checks */
   if (packet->dst_id_type != SILC_ID_CHANNEL)
     goto out;
index e82b41a218af2bc32b7e0ddb2229ac7266b86a87..234d88d826aa8e9ce6d3cd55c82335e6a8bf84d0 100644 (file)
@@ -1422,15 +1422,16 @@ void silc_ske_free_key_material(SilcSKEKeyMaterial *key)
   if (key->receive_iv)
     silc_free(key->receive_iv);
   if (key->send_enc_key) {
-    memset(key->send_enc_key, 0, key->enc_key_len);
+    memset(key->send_enc_key, 0, key->enc_key_len / 8);
     silc_free(key->send_enc_key);
   }
   if (key->receive_enc_key) {
-    memset(key->receive_enc_key, 0, key->enc_key_len);
+    memset(key->receive_enc_key, 0, key->enc_key_len / 8);
     silc_free(key->receive_enc_key);
   }
   if (key->hmac_key) {
     memset(key->hmac_key, 0, key->hmac_key_len);
     silc_free(key->hmac_key);
   }
+  silc_free(key);
 }