updates.
[silc.git] / lib / silcclient / client_keyagr.c
index ca62805cfbfdfdb963f082d422b4f38d3e8ea4f9..c80b1c620f2cbb8ac6746aa11e5c468ed08d6bef 100644 (file)
@@ -178,6 +178,7 @@ SILC_TASK_CALLBACK(silc_client_process_key_agreement)
   proto_ctx->responder = TRUE;
   proto_ctx->context = context;
   proto_ctx->send_packet = silc_client_key_agreement_send_packet;
+  proto_ctx->verify = silc_client_protocol_ke_verify_key;
 
   /* Prepare the connection for key exchange protocol. We allocate the
      protocol but will not start it yet. The connector will be the
@@ -222,7 +223,8 @@ SILC_TASK_CALLBACK(silc_client_key_agreement_timeout)
    that port for the key agreement protocol. It also sends the `hostname'
    and the `port' in the key agreement packet to the remote client. This
    would indicate that the remote client may initiate the key agreement
-   protocol to the `hostname' on the `port'.
+   protocol to the `hostname' on the `port'.  If port is zero then the
+   bound port is undefined (the operating system defines it).
 
    If the `hostname' and `port' is not provided then empty key agreement
    packet is sent to the remote client. The remote client may reply with
@@ -268,7 +270,7 @@ void silc_client_send_key_agreement(SilcClient client,
     return;
 
   /* Create the listener if hostname and port was provided */
-  if (hostname && port) {
+  if (hostname) {
     ke = silc_calloc(1, sizeof(*ke));
     ke->fd = silc_net_create_server(port, hostname);
 
@@ -513,6 +515,7 @@ void silc_client_perform_key_agreement_fd(SilcClient client,
   proto_ctx->responder = FALSE;
   proto_ctx->context = ke;
   proto_ctx->send_packet = silc_client_key_agreement_send_packet;
+  proto_ctx->verify = silc_client_protocol_ke_verify_key;
 
   /* Perform key exchange protocol. */
   silc_protocol_alloc(SILC_PROTOCOL_CLIENT_KEY_EXCHANGE,