More client library rewrites (added rekey)
[silc.git] / lib / silcclient / client_internal.h
index 3dbcd6729439b7193f6bf30bcfeea313d327e759..0acee44df7bbbdfe4c7593bebee14bbc3b15cd06 100644 (file)
@@ -28,6 +28,7 @@
 #include "client_prvmsg.h"
 #include "client_channel.h"
 #include "client_notify.h"
+#include "client_keyagr.h"
 
 /****************************** Definitions *********************************/
 
 
 /********************************** Types ***********************************/
 
+/* Public key verification context */
+typedef struct {
+  SilcSKE ske;
+  SilcSKEVerifyCbCompletion completion;
+  void *completion_context;
+} *VerifyKeyContext;
+
 /* Context to hold the connection authentication request callbacks that
    will be called when the server has replied back to our request about
    current authentication method in the session. */
@@ -174,10 +182,12 @@ struct SilcClientConnectionInternalStruct {
   unsigned int connect            : 1;  /* Connect remote host */
   unsigned int disconnected       : 1;  /* Disconnected by remote host */
   unsigned int key_exchange       : 1;   /* Start key exchange */
+  unsigned int rekeying           : 1;   /* Start rekey */
 
   /* Flags */
   unsigned int verbose            : 1;   /* Notify application */
   unsigned int registering        : 1;  /* Set when registering to network */
+  unsigned int rekey_responder    : 1;   /* Set when rekeying as responder */
 
   SilcClientAway *away;
   SilcClientConnAuthRequest connauth;
@@ -211,12 +221,11 @@ SilcUInt16 silc_client_command_send_argv(SilcClient client,
                                         SilcUInt32 *argv_lens,
                                         SilcUInt32 *argv_types);
 void silc_client_command_free(SilcClientCommandContext cmd);
+void silc_client_fsm_destructor(SilcFSM fsm, void *fsm_context,
+                               void *destructor_context);
 
 void silc_client_ftp(SilcClient client, SilcClientConnection conn,
                     SilcPacket packet);
-void silc_client_key_agreement(SilcClient client,
-                              SilcClientConnection conn,
-                              SilcPacket packet);
 void silc_client_connection_auth_request(SilcClient client,
                                         SilcClientConnection conn,
                                         SilcPacket packet);