SSL_CTX_add_server_custom_ext

Register a custom TLS extension handler for the server role on an SSL context.

Synopsis

Declared in <openssl/ssl.h>

int
SSL_CTX_add_server_custom_ext(
    SSL_CTX* ctx,
    unsigned int ext_type,
    custom_ext_add_cb add_cb,
    custom_ext_free_cb free_cb,
    void* add_arg,
    custom_ext_parse_cb parse_cb,
    void* parse_arg);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxServer SSL context that sends or receives the extension.
ext_typeExtension type code (must not collide with built-in handlers).
add_cbCallback that constructs extension data to send, or NULL.
free_cbCallback that frees data produced by add_cb, or NULL.
add_argOpaque pointer passed to add_cb / free_cb.
parse_cbCallback that parses a received extension, or NULL.
parse_argOpaque pointer passed to parse_cb.