Perform a SSL handshake on an async-io-state.
comm
async-io-state-handshake async-io-state callback &optional timeout
async-io-state⇩ | |
callback⇩ |
A function designator for a function with two arguments. |
timeout⇩ | nil or a real. |
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 before 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.
async-io-state
25.8 Using SSL
25 TCP and UDP socket communication and SSL
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:26