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

Name

Description

s

SSL connection constructing the extension.

ext_type

TLS extension type code.

context

Bitmask identifying the message and role (SSL_EXT_*).

out

Set to point at the extension payload bytes to send.

outlen

Receives the length of *`out.`

x

Certificate associated with this extension when relevant, or NULL.

chainidx

Index of x in the certificate chain when applicable.

al

Set to a TLS alert code on failure.

add_arg

User argument from SSL_CTX_add_custom_ext.

Created with MrDocs