SSL_CTX_npn_select_cb_func

NPN client callback that selects a protocol from the server's list.

Synopsis

Declared in <openssl/ssl.h>

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

Return Value

SSL_TLSEXT_ERR_OK on success; other values abort the connection.

Parameters

NameDescription
sSSL connection performing NPN.
outOn success, set to the selected protocol (may point into in).
outlenReceives the length of the selected protocol name.
inServer-advertised protocols in wire list format.
inlenLength of in in bytes.
argUser argument registered with SSL_CTX_set_next_proto_select_cb.