Handbook
Glossary
send-secure-handshake ( -- )
Secure sockets (SSL, TLS)
ยป
Upgrading existing connections
Next:
accept-secure-handshake ( -- )
Vocabulary
io
.
sockets
.
secure
Generic word contract
Upgrades the socket connection of the current
with-client
scope to a secure connection and initiates a SSL/TLS handshake.
Errors
Throws
upgrade-on-non-socket
or
upgrade-buffers-full
if used improperly.
Examples
This word is used by the
smtp
library to implement SMTP-TLS.
Definition
IN:
io.sockets.secure
HOOK:
send-secure-handshake
secure-socket-backend
( -- )
Methods
USING:
accessors
io.sockets
io.sockets.secure
io.sockets.secure.openssl
kernel
namespaces
openssl
;
M:
openssl
send-secure-handshake
input/output-ports
[
make-input/output-secure
]
[
nip
(send-secure-handshake)
]
[
nip
remote-address
get
dup
inet?
[
host>>
swap
handle>>
check-certificate
]
[
2drop
]
if
]
2tri
;