Handbook
Glossary
<ssl-socket> ( winsock hostname -- ssl )
Vocabulary
io
.
sockets
.
secure
.
openssl
Inputs
winsock
an
object
hostname
an
object
Outputs
ssl
an
object
Definition
USING:
accessors
alien.strings
io.encodings.utf8
io.sockets.secure
io.sockets.secure.openssl.private
kernel
openssl
openssl.libcrypto
openssl.libssl
sequences
;
IN:
io.sockets.secure.openssl
::
<ssl-socket>
( winsock hostname -- ssl )
winsock
socket-handle
BIO_NOCLOSE
BIO_new_socket
dup
ssl-error
:>
bio winsock
<ssl-handle>
:>
handle handle
handle>>
:>
native-handle
current-secure-context
config>>
alpn-supported-protocols>>
[
drop
native-handle
ctx>>
alpn_select_cb_func
f
SSL_CTX_set_alpn_select_cb
]
unless-empty
hostname
[
utf8
string>alien
native-handle
swap
SSL_set_tlsext_host_name
ssl-error
]
when*
native-handle bio bio
SSL_set_bio
handle
;