SSL_CTX_alpn_select_cb_func

Server callback that selects an ALPN protocol from the client's offer.

Synopsis

Declared in <openssl/ssl.h>

typedef int(* SSL_CTX_alpn_select_cb_func)(SSL*, unsigned char const**, unsigned char*, unsigned char const*, unsigned int, void*);

Return Value

SSL_TLSEXT_ERR_OK to accept, SSL_TLSEXT_ERR_NOACK to skip ALPN, or SSL_TLSEXT_ERR_ALERT_FATAL to abort.

Parameters

NameDescription
sslSSL connection negotiating ALPN.
outOn success, set to the selected protocol (may point into in).
outlenReceives the length of the selected protocol.
inClient-offered protocols in wire list format.
inlenLength of in in bytes.
argUser argument registered with SSL_CTX_set_alpn_select_cb.