[#SSL_CTX_add_custom_ext] = SSL_CTX_add_custom_ext :mrdocs: Register a custom TLS extension for client and/or server using the extended callback API. == Synopsis Declared in `<openssl/ssl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int SSL_CTX_add_custom_ext( xref:SSL_CTX.adoc[SSL_CTX]* ctx, unsigned int ext_type, unsigned int context, xref:SSL_custom_ext_add_cb_ex.adoc[SSL_custom_ext_add_cb_ex] add_cb, xref:SSL_custom_ext_free_cb_ex.adoc[SSL_custom_ext_free_cb_ex] free_cb, void* add_arg, xref:SSL_custom_ext_parse_cb_ex.adoc[SSL_custom_ext_parse_cb_ex] parse_cb, void* parse_arg); ---- == Return Value 1 on success, or 0 on error. == Parameters [cols="1,4"] |=== | 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.` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#