SSL_custom_ext_add_cb_ex

Callback that supplies the contents of a custom TLS extension being sent.

Synopsis

Declared in <openssl/ssl.h>

typedef int(* SSL_custom_ext_add_cb_ex)(SSL*, unsigned int, unsigned int, unsigned char const**, size_t*, X509*, size_t, int*, void*);

Return Value

1 to include the extension, 0 to omit it, or -1 to abort with *al.

Parameters

NameDescription
sSSL connection constructing the extension.
ext_typeTLS extension type code.
contextBitmask identifying the message and role (SSL_EXT_*).
outSet to point at the extension payload bytes to send.
outlenReceives the length of *out.
xCertificate associated with this extension when relevant, or NULL.
chainidxIndex of x in the certificate chain when applicable.
alSet to a TLS alert code on failure.
add_argUser argument from SSL_CTX_add_custom_ext.