[#SSL_CTX_set_session_ticket_cb]
= SSL&lowbar;CTX&lowbar;set&lowbar;session&lowbar;ticket&lowbar;cb
:mrdocs:

Register callbacks that attach and consume application data in TLS session tickets&period;

== Synopsis

Declared in `&lt;openssl&sol;ssl&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
SSL&lowbar;CTX&lowbar;set&lowbar;session&lowbar;ticket&lowbar;cb(
    xref:SSL_CTX.adoc[SSL&lowbar;CTX]* ctx,
    xref:SSL_CTX_generate_session_ticket_fn.adoc[SSL&lowbar;CTX&lowbar;generate&lowbar;session&lowbar;ticket&lowbar;fn] gen&lowbar;cb,
    xref:SSL_CTX_decrypt_session_ticket_fn.adoc[SSL&lowbar;CTX&lowbar;decrypt&lowbar;session&lowbar;ticket&lowbar;fn] dec&lowbar;cb,
    void* arg);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Server SSL context that will invoke the ticket callbacks&period;
| *gen&lowbar;cb*
| Called before ticket creation (may call SSL&lowbar;SESSION&lowbar;set1&lowbar;ticket&lowbar;appdata), or NULL&period;
| *dec&lowbar;cb*
| Called after ticket decryption with `status` and optional appdata, or NULL&period;
| *arg*
| Opaque userdata passed to both callbacks&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
