updates.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 1 Jun 2001 08:27:47 +0000 (08:27 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 1 Jun 2001 08:27:47 +0000 (08:27 +0000)
CHANGES
TODO
lib/silcclient/client.c
lib/silcclient/client.h

diff --git a/CHANGES b/CHANGES
index 082c5354db0b02f7d41d57955f54d07569250628..21aac1076a66937629734d94788ed5c839e04cde 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+Fri Jun  1 10:28:09 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Updated TODO.
+
+       * Removed silc_client_packet_send_flush from the client library
+         as it is not needed.  Affected file lib/silcclient/client.[ch].
+
 Thu May 31 13:57:33 CEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Added new distribution feature, DISTLABEL.  Every distribution
diff --git a/TODO b/TODO
index 5923e89e481c7383f4a43514b17f76bf83e93b1b..1526c8010f3929a4a3c83dd6ff9dbdd71ccfb590 100644 (file)
--- a/TODO
+++ b/TODO
@@ -10,10 +10,34 @@ TODO/bugs in Irssi SILC client
    that the user has.  And a local command to dump the contents of the
    public key to the screen.  Something like LISTKEYS, SHOWKEY...
 
+ o Set different kind of settings, like, /set mutual_authentication,
+   /set key_exchange_timeout, /set conn_auth_timeout etc etc.
+
+ o Extend the /HELP command to support sub commands or something.  So
+   that user can say /help set mutual_authentication they would get
+   help of the mutual_authentication setting.
+
+ o We should get rid of the clientconfig.[ch] in Irssi SILC and move the
+   cipher, hash, hmac and pkcs configuration to the Irssi SILC's config
+   file.
+
 
 TODO/bugs In SILC Client Library
 ================================
 
+ o All protocol execution timeouts are hard coded. They should be 
+   configurable and the Irssi SILC client should be able to set them
+   with for example /set key_exchange_timeout etc.  The silc_client_alloc
+   should take a Params structure or something as argument.
+
+ o silc_client_close_connection leaks memory.  Read the XXX from code.
+
+ o Move the silc_client_[chmode|chumode|chumode_char] away from the library,
+   may be to util library.
+
+ o Some of the ops->say's should be removed and moved to the application
+   from the library.  Go through these.
+
  o The client library must manage somehow when receiving client that has
    same nickname, same server, same username but different Client ID than
    what we have in the cache.  It is now assumed that they are different
@@ -29,9 +53,6 @@ TODO/bugs In SILC Client Library
    but all error printing should be handled by the library, etc...
    This is not a showstopper.
 
- o Input line on UI is buggy.  Cursor movement etc bugs.  Too lazy to
-   fix it.
-
 
 TODO/bugs In SILC Server
 ========================
index 89aa1c0f4b8e057eeb8d91e56b5b4ac00ded5430..f061327f89ce608be7ecdcf55bfd4a10fb088e4c 100644 (file)
@@ -481,10 +481,7 @@ SILC_TASK_CALLBACK(silc_client_connect_to_server_second)
   silc_free(ctx);
   sock->protocol = NULL;
 
-  /* Allocate the authentication protocol. This is allocated here
-     but we won't start it yet. We will be receiving party of this
-     protocol thus we will wait that connecting party will make
-     their first move. */
+  /* Allocate the authenteication protocol and execute it. */
   silc_protocol_alloc(SILC_PROTOCOL_CLIENT_CONNECTION_AUTH, 
                      &sock->protocol, (void *)proto_ctx, 
                      silc_client_connect_to_server_final);
@@ -888,8 +885,6 @@ void silc_client_packet_parse_type(SilcClient client,
     } else {
       SILC_LOG_ERROR(("Received Key Exchange packet but no key exchange "
                      "protocol active, packet dropped."));
-
-      /* XXX Trigger KE protocol?? Rekey actually! */
     }
     break;
 
@@ -1141,107 +1136,6 @@ void silc_client_packet_send(SilcClient client,
   silc_client_packet_send_real(client, sock, force_send, FALSE);
 }
 
-void silc_client_packet_send_flush(SilcClient client, 
-                                  SilcSocketConnection sock,
-                                  SilcPacketType type, 
-                                  void *dst_id,
-                                  SilcIdType dst_id_type,
-                                  SilcCipher cipher,
-                                  SilcHmac hmac,
-                                  unsigned char *data, 
-                                  uint32 data_len)
-{
-  SilcPacketContext packetdata;
-
-  /* First flush the packet queue. */
-  
-  if (sock->outbuf->data - sock->outbuf->head)
-    silc_buffer_push(sock->outbuf, 
-                    sock->outbuf->data - sock->outbuf->head);
-  
-  silc_client_packet_send_real(client, sock, TRUE, TRUE);
-  
-  /* The packet has been sent and now it is time to set the connection
-     back to only for input. When there is again some outgoing data 
-     available for this connection it will be set for output as well. 
-     This call clears the output setting and sets it only for input. */
-  SILC_CLIENT_SET_CONNECTION_FOR_INPUT(sock->sock);
-  SILC_UNSET_OUTBUF_PENDING(sock);
-  silc_buffer_clear(sock->outbuf);
-
-  SILC_LOG_DEBUG(("Sending packet, type %d", type));
-
-  /* Get data used in the packet sending, keys and stuff */
-  if ((!cipher || !hmac || !dst_id) && sock->user_data) {
-    if (!cipher && ((SilcClientConnection)sock->user_data)->send_key)
-      cipher = ((SilcClientConnection)sock->user_data)->send_key;
-
-    if (!hmac && ((SilcClientConnection)sock->user_data)->hmac_send)
-      hmac = ((SilcClientConnection)sock->user_data)->hmac_send;
-
-    if (!dst_id && ((SilcClientConnection)sock->user_data)->remote_id) {
-      dst_id = ((SilcClientConnection)sock->user_data)->remote_id;
-      dst_id_type = SILC_ID_SERVER;
-    }
-  }
-
-  /* Set the packet context pointers */
-  packetdata.flags = 0;
-  packetdata.type = type;
-  if (sock->user_data && 
-      ((SilcClientConnection)sock->user_data)->local_id_data) {
-    packetdata.src_id = ((SilcClientConnection)sock->user_data)->local_id_data;
-    packetdata.src_id_len = 
-      silc_id_get_len(((SilcClientConnection)sock->user_data)->local_id,
-                     SILC_ID_CLIENT);
-  } else { 
-    packetdata.src_id = silc_calloc(SILC_ID_CLIENT_LEN, sizeof(unsigned char));
-    packetdata.src_id_len = SILC_ID_CLIENT_LEN;
-  }
-  packetdata.src_id_type = SILC_ID_CLIENT;
-  if (dst_id) {
-    packetdata.dst_id = silc_id_id2str(dst_id, dst_id_type);
-    packetdata.dst_id_len = silc_id_get_len(dst_id, dst_id_type);
-    packetdata.dst_id_type = dst_id_type;
-  } else {
-    packetdata.dst_id = NULL;
-    packetdata.dst_id_len = 0;
-    packetdata.dst_id_type = SILC_ID_NONE;
-  }
-  packetdata.truelen = data_len + SILC_PACKET_HEADER_LEN + 
-    packetdata.src_id_len + packetdata.dst_id_len;
-  packetdata.padlen = SILC_PACKET_PADLEN(packetdata.truelen);
-
-  /* Prepare outgoing data buffer for packet sending */
-  silc_packet_send_prepare(sock, 
-                          SILC_PACKET_HEADER_LEN +
-                          packetdata.src_id_len + 
-                          packetdata.dst_id_len,
-                          packetdata.padlen,
-                          data_len);
-
-  SILC_LOG_DEBUG(("Putting data to outgoing buffer, len %d", data_len));
-
-  packetdata.buffer = sock->outbuf;
-
-  /* Put the data to the buffer */
-  if (data && data_len)
-    silc_buffer_put(sock->outbuf, data, data_len);
-
-  /* Create the outgoing packet */
-  silc_packet_assemble(&packetdata);
-
-  /* Encrypt the packet */
-  if (cipher)
-    silc_packet_encrypt(cipher, hmac, sock->outbuf, sock->outbuf->len);
-
-  SILC_LOG_HEXDUMP(("Packet, len %d", sock->outbuf->len),
-                  sock->outbuf->data, sock->outbuf->len);
-
-  /* Now actually send the packet */
-  silc_client_packet_send_real(client, sock, TRUE, TRUE);
-}
-
 /* Closes connection to remote end. Free's all allocated data except
    for some information such as nickname etc. that are valid at all time. 
    If the `sock' is NULL then the conn->sock will be used.  If `sock' is
index 13ebfd0bcd5824dc270e1c1e64631649f1803619..bd1c7e88042d0f4e40bded5338a1754ab2e5fbf5 100644 (file)
@@ -296,13 +296,4 @@ void silc_client_private_message(SilcClient client,
                                 SilcSocketConnection sock, 
                                 SilcPacketContext *packet);
 
-void silc_client_packet_send_flush(SilcClient client, 
-                                  SilcSocketConnection sock,
-                                  SilcPacketType type, 
-                                  void *dst_id,
-                                  SilcIdType dst_id_type,
-                                  SilcCipher cipher,
-                                  SilcHmac hmac,
-                                  unsigned char *data, 
-                                  uint32 data_len);
 #endif