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

Name

Description

ctx

Server SSL context that sends or receives the extension.

ext_type

Extension type code (must not collide with built‐in handlers).

add_cb

Callback that constructs extension data to send, or NULL.

free_cb

Callback that frees data produced by add_cb, or NULL.

add_arg

Opaque pointer passed to add_cb / free_cb.

parse_cb

Callback that parses a received extension, or NULL.

parse_arg

Opaque pointer passed to parse_cb.

Created with MrDocs