updates.
[silc.git] / lib / silcclient / idlist.h
index c120ff296c6659f349d442e84fc2ca3352df6466..0dc48f8f316e19e90c329bcd8c139dcb86506268 100644 (file)
@@ -34,13 +34,14 @@ typedef struct {
   uint32 num;
   uint32 mode;                 /* User mode in SILC */
   SilcClientID *id;            /* The Client ID */
+  bool valid;                  /* FALSE if this entry is not valid */
   SilcCipher send_key;         /* Private message key for sending */
   SilcCipher receive_key;      /* Private message key for receiving */
   unsigned char *key;          /* Set only if appliation provided the
                                   key material. NULL if the library 
                                   generated the key. */
   uint32 key_len;
-  int generated;               /* TRUE if library generated the key */
+  bool generated;              /* TRUE if library generated the key */
   SilcClientKeyAgreement ke;   /* Current key agreement context or NULL */
 } *SilcClientEntry;
 
@@ -78,6 +79,13 @@ typedef struct SilcChannelEntryStruct {
   SilcHmac hmac;                            /* Current HMAC */
   SilcDList private_keys;                   /* List of private keys or NULL */
   SilcChannelPrivateKey curr_key;           /* Current private key */
+
+  /* Old channel key is saved for a short period of time when rekey occurs
+     in case if someone is sending messages after the rekey encrypted with
+     the old key, we can still decrypt them. */
+  SilcCipher old_channel_key;
+  SilcHmac old_hmac;
+  SilcTask rekey_task;
 } *SilcChannelEntry;
 
 /* Server entry context. This represents one server. When server information