SSL_CTX_set_alpn_protos

Set the ALPN protocol list advertised or offered by an SSL context.

Synopsis

Declared in <openssl/ssl.h>

int
SSL_CTX_set_alpn_protos(
    SSL_CTX* ctx,
    unsigned char const* protos,
    unsigned int protos_len);

Return Value

0 on success, or non-zero on failure (inverted success convention).

Parameters

NameDescription
ctxSSL context to configure.
protosWire-format protocol list (length-prefixed names); empty clears ALPN.
protos_lenLength of protos in bytes.