Perform a SSL handshake on an async-io-state.
The function async-io-state-handshake
performs a handshake on async-io-state, which must be attached to SSL.
When the handshake has finished successfully or failed, callback is called with two arguments: async-io-state and an error-indicator. The error-indicator is nil
when successful, otherwise it is a list suitable for an error call as in (apply 'error error-indicator)
. The async-io-state-read-status of async-io-state is also set appropriately.
If the handshake does not finish in timeout seconds, callback is called with non-nil error-indicator: ("Handshake timed out")
, and the async-io-state-read-status is set to :timeout
. If the other side closes the socket cleanly, callback
is called error-indicator: ("SSL connection closed")
, and the async-io-state-read-status is set to :eof
. Other cases indicate an actual error in the handshake.
async-io-state-handshake
must not be called when there is any other operation on async-io-state and new operations on async-io-state must not be started until callback has been called.
If SSL was attached with ssl-side :both
, then you will need to specify which side to take in the handshake by calling ssl-set-accept-state
or ssl-set-connect-state
with the ssl-pointer return by socket-stream-ssl.
LispWorks User Guide and Reference Manual - 20 Sep 2017