Added version detection support to SKE.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 19 Jul 2000 07:07:47 +0000 (07:07 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 19 Jul 2000 07:07:47 +0000 (07:07 +0000)
apps/silc/protocol.c
apps/silcd/command.c
apps/silcd/protocol.c

index 31fb99b2e3056b66a1add41d31ee8f76b5216f49..a86b29e0d66ab7186d492d632c2c41b078c29a53 100644 (file)
@@ -23,6 +23,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.7  2000/07/19 07:07:47  priikone
+ *     Added version detection support to SKE.
+ *
  * Revision 1.6  2000/07/14 06:12:29  priikone
  *     Put the HMAC keys into the HMAC object instead on having them
  *     saved elsewhere; we can use now silc_hmac_make instead of
@@ -51,6 +54,8 @@
 SILC_TASK_CALLBACK(silc_client_protocol_connection_auth);
 SILC_TASK_CALLBACK(silc_client_protocol_key_exchange);
 
+extern char *silc_version_string;
+
 /* SILC client protocol list */
 const SilcProtocolObject silc_protocol_list[] =
 {
@@ -195,7 +200,8 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
        SilcSKEStartPayload *start_payload;
 
        /* Assemble security properties. */
-       silc_ske_assemble_security_properties(ske, &start_payload);
+       silc_ske_assemble_security_properties(ske, silc_version_string,
+                                             &start_payload);
 
        /* Start the key exchange by sending our security properties
           to the remote end. */
@@ -267,6 +273,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
           Key Exhange 1 Payload to the responder. */
        status = 
          silc_ske_initiator_phase_2(ctx->ske,
+                                    client->public_key,
                                     silc_client_protocol_ke_send_packet,
                                     context);
       }
index f0d2447062af5f93a32047e888a7d0e54435b9c1..e3e810ee0327c0a35bae54703e1a959f00f6c7cd 100644 (file)
@@ -20,6 +20,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.11  2000/07/19 07:08:09  priikone
+ *     Added version detection support to SKE.
+ *
  * Revision 1.10  2000/07/17 11:47:30  priikone
  *     Added command lagging support. Added idle counting support.
  *
@@ -213,7 +216,7 @@ void silc_server_command_process(SilcServer server,
   if (cmd == NULL) {
     SILC_LOG_ERROR(("Unknown command, packet dropped"));
     silc_free(ctx);
-    return;
+    goto out;
   }
 
  out:
index 0dd06fbd485b2c7998d334332950c4e89ba735be..0f91d2d01d987d6b9393ffe53da077a9b307f34b 100644 (file)
@@ -23,6 +23,9 @@
 /*
  * $Id$
  * $Log$
+ * Revision 1.8  2000/07/19 07:08:09  priikone
+ *     Added version detection support to SKE.
+ *
  * Revision 1.7  2000/07/14 06:14:20  priikone
  *     Put the HMAC keys into the HMAC object instead of having them
  *     saved elsewhere; now we can use silc_hmac_make insteaad of
@@ -60,6 +63,8 @@
 SILC_TASK_CALLBACK(silc_server_protocol_connection_auth);
 SILC_TASK_CALLBACK(silc_server_protocol_key_exchange);
 
+extern char *silc_version_string;
+
 /* SILC client protocol list */
 const SilcProtocolObject silc_protocol_list[] =
 {
@@ -189,12 +194,14 @@ SILC_TASK_CALLBACK(silc_server_protocol_key_exchange)
        /* Start the key exchange by processing the received security
           properties packet from initiator. */
        status = silc_ske_responder_start(ske, ctx->rng, ctx->sock,
+                                         silc_version_string,
                                          ctx->packet, NULL, NULL);
       } else {
        SilcSKEStartPayload *start_payload;
 
        /* Assemble security properties. */
-       silc_ske_assemble_security_properties(ske, &start_payload);
+       silc_ske_assemble_security_properties(ske, silc_version_string,
+                                             &start_payload);
 
        /* Start the key exchange by sending our security properties
           to the remote end. */
@@ -278,6 +285,7 @@ SILC_TASK_CALLBACK(silc_server_protocol_key_exchange)
           Key Exhange 1 Payload to the responder. */
        status = 
          silc_ske_initiator_phase_2(ctx->ske,
+                                    server->public_key,
                                     silc_server_protocol_ke_send_packet,
                                     context);
       }