Merged silc_1_0_branch to trunk.
[silc.git] / lib / silcclient / protocol.h
index fc73f6de37e018723cad55286fa19065f1d034fb..019fa37adbc5af7364bacec5e30b73021c389b2a 100644 (file)
@@ -2,15 +2,14 @@
 
   protocol.h
 
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+  Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2000 Pekka Riikonen
+  Copyright (C) 1997 - 2004 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-  
+  the Free Software Foundation; version 2 of the License.
+
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -52,6 +51,7 @@ typedef struct {
 typedef struct {
   void *client;
   SilcSocketConnection sock;
+  SilcClientConnectionStatus status;
 
   /* SKE object from Key Exchange protocol. */
   SilcSKE ske;
@@ -68,7 +68,7 @@ typedef struct {
      starting the protocol if we know the authentication data. Otherwise
      these are and remain NULL. */
   unsigned char *auth_data;
-  uint32 auth_data_len;
+  SilcUInt32 auth_data_len;
 
   SilcTask timeout_task;
 } SilcClientConnAuthInternalContext;
@@ -81,7 +81,6 @@ typedef struct {
   bool responder;                  /* TRUE if we are receiving party */
   bool pfs;                        /* TRUE if PFS is to be used */
   SilcSKE ske;                     /* Defined if PFS is used */
-  SilcSKEKeyMaterial *keymat;      /* Defined if PFS is used */
   SilcPacketContext *packet;
 } SilcClientRekeyInternalContext;
 
@@ -92,11 +91,13 @@ void silc_client_protocol_ke_send_packet(SilcSKE ske,
                                         SilcBuffer packet,
                                         SilcPacketType type,
                                         void *context);
-SilcSKEStatus silc_client_protocol_ke_verify_key(SilcSKE ske,
-                                                unsigned char *pk_data,
-                                                uint32 pk_len,
-                                                SilcSKEPKType pk_type,
-                                                void *context);
+void silc_client_protocol_ke_verify_key(SilcSKE ske,
+                                       unsigned char *pk_data,
+                                       SilcUInt32 pk_len,
+                                       SilcSKEPKType pk_type,
+                                       void *context,
+                                       SilcSKEVerifyCbCompletion completion,
+                                       void *completion_context);
 void silc_client_protocol_ke_set_keys(SilcSKE ske,
                                      SilcSocketConnection sock,
                                      SilcSKEKeyMaterial *keymat,
@@ -104,11 +105,7 @@ void silc_client_protocol_ke_set_keys(SilcSKE ske,
                                      SilcPKCS pkcs,
                                      SilcHash hash,
                                      SilcHmac hmac,
-                                     SilcSKEDiffieHellmanGroup group);
-void silc_client_protocol_rekey_generate(SilcClient client,
-                                        SilcClientRekeyInternalContext *ctx);
-void 
-silc_client_protocol_rekey_generate_pfs(SilcClient client,
-                                       SilcClientRekeyInternalContext *ctx);
+                                     SilcSKEDiffieHellmanGroup group,
+                                     bool is_responder);
 
 #endif