Handbook
Glossary
configure-alpn ( ctx -- )
Vocabulary
io
.
sockets
.
secure
.
openssl
Inputs
ctx
an
object
Outputs
None
Definition
USING:
accessors
alien.data
classes.struct
io.sockets.secure.openssl.private
kernel
math
openssl
openssl.libssl
sequences
;
IN:
io.sockets.secure.openssl
::
configure-alpn
( ctx -- )
ctx
config>>
alpn-supported-protocols>>
dup
empty?
[
drop
]
[
alpn-wire-format
:>
wire ctx
handle>>
wire
dup
length
SSL_CTX_set_alpn_protos
zero?
[
throw-ssl-error
]
unless
wire
malloc-byte-array
dup
ctx
aliens>>
push
:>
data
alpn-protocols
malloc-struct
dup
ctx
aliens>>
push
data
>>data
wire
length
>>length
:>
protocols ctx
handle>>
alpn_select_cb_func
protocols
SSL_CTX_set_alpn_select_cb
]
if
;