Register a custom TLS extension for client and/or server using the extended callback API.
Declared in <openssl/ssl.h>
int
SSL_CTX_add_custom_ext(
SSL_CTX* ctx,
unsigned int ext_type,
unsigned int context,
SSL_custom_ext_add_cb_ex add_cb,
SSL_custom_ext_free_cb_ex free_cb,
void* add_arg,
SSL_custom_ext_parse_cb_ex parse_cb,
void* parse_arg);
1 on success, or 0 on error.
| Name | Description |
|---|---|
| ctx | SSL context that sends or receives the extension. |
| ext_type | Extension type code (must not collide with OpenSSL-built-in handlers). |
| context | Bitmask of SSL_EXT_* contexts in which the extension is relevant. |
| add_cb | Callback that constructs extension data to send, or NULL. |
| free_cb | Optional callback to free data produced by add_cb. |
| add_arg | Application argument passed to add_cb and free_cb. |
| parse_cb | Callback that parses extension data received from the peer, or NULL. |
| parse_arg | Application argument passed to parse_cb. |