+
+
+Function silc_client_send_key_agreement
+
+
+SYNOPSIS
+
+
+ void silc_client_send_key_agreement(SilcClient client,
+ SilcClientConnection conn,
+ SilcClientEntry client_entry,
+ SilcClientConnectionParams *params,
+ SilcPublicKey public_key,
+ SilcPrivateKey private_key,
+ SilcKeyAgreementCallback completion,
+ void *context);
+
+
+DESCRIPTION
+
+
+ Sends key agreement request to the remote client indicated by the
+ `client_entry'.
+
+ If `params' is non-NULL and it has the `local_ip' and `local_port' set
+ the caller will provide the connection endpoint for the key agreement
+ connection. The `bind_ip' can be used to bind to that IP instead of
+ `local_ip'. If the `udp' is set to TRUE the connection will be UDP
+ instead of TCP. Caller may also set the `repository', `verify_notfound'
+ and `timeout_secs' fields in `params'. Other fields are ignored.
+ If `params' is NULL, then the `client_entry' is expected to provide
+ the connection endpoint for us. It is recommended the `timeout_secs'
+ is specified in case the remote client does not reply anything to
+ the request.
+
+ The `public_key' and `private_key' is our identity in the key agreement.
+
+ In case we do not provide the connection endpoint, we will receive
+ the `key_agreement' client operation when the remote send its own
+ key agreement request packet. We may then there start the key
+ agreement with silc_client_perform_key_agreement. If we provided the
+ the connection endpoint, the client operation will not be called.
+
+ There can be only one active key agreement for `client_entry'. Old
+ key agreement may be aborted by calling silc_client_abort_key_agreement.
+
+
+EXAMPLE
+
+
+ // Send key agreement request (we don't provide connection endpoint)
+ silc_client_send_key_agreement(client, conn, remote_client,
+ NULL, public_key, private_key,
+ my_keyagr_completion, my_context);
+
+ // Another example where we provide connection endpoint (TCP).
+ SilcClientConnectionParams params;
+ memset(¶ms, 0, sizeof(params));
+ params.local_ip = local_ip;
+ params.local_port = local_port;
+ params.timeout_secs = 60;
+ silc_client_send_key_agreement(client, conn, remote_client,
+ ¶ms, public_key, private_key,
+ my_keyagr_completion, my_context);
+
+
+
+ |
+