Function silc_ske_initiator_finish
SYNOPSIS
SilcSKEStatus silc_ske_initiator_finish(SilcSKE ske,
SilcBuffer ke_payload);
DESCRIPTION
Receives the reply from the responder and processes it. The
`ke_payload' is the reply and application must provide it as argument.
This function will verify the responder's public key, by calling
the `verify_key' callback that was set with silc_ske_set_callbacks
function.
If this function returns error, no callbacks will be called. If
this function needs to verify remote end's public key, this will
return SILC_SKE_STATUS_PENDING, which indicates application that
SKE is performing asynchronous operation and is in pending status.
When in this status application must not continue with calling
any other SKE routine. The asynchronous operation is the `verify_key'
callback, which application completes by calling its completion
callback. After completion the SKE libary will call the
`proto_continue' callback, to indicate application that pending
status is over and it is safe to continue the execution of SKE,
which application does by calling the silc_ske_end function.
If this function returns SILC_SKE_STATUS_OK, it will not call the
`verify_key' callback, however, it will or has already called the
`proto_continue' callback.
Application must not continue execution of the SKE before library
has called the `proto_continue' callback. After it is called
the application finishes SKE session by calling silc_ske_end
function.
|