From: Pekka Riikonen Date: Wed, 19 Jul 2000 07:07:47 +0000 (+0000) Subject: Added version detection support to SKE. X-Git-Tag: SILC.0.1~428 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=e8860a13867343c461a91f2ebc483d6edefe9865;p=silc.git Added version detection support to SKE. --- diff --git a/apps/silc/protocol.c b/apps/silc/protocol.c index 31fb99b2..a86b29e0 100644 --- a/apps/silc/protocol.c +++ b/apps/silc/protocol.c @@ -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); } diff --git a/apps/silcd/command.c b/apps/silcd/command.c index f0d24470..e3e810ee 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -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: diff --git a/apps/silcd/protocol.c b/apps/silcd/protocol.c index 0dd06fbd..0f91d2d0 100644 --- a/apps/silcd/protocol.c +++ b/apps/silcd/protocol.c @@ -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); }