[#SSL_CTX_set_stateless_cookie_generate_cb]
= SSL&lowbar;CTX&lowbar;set&lowbar;stateless&lowbar;cookie&lowbar;generate&lowbar;cb
:mrdocs:

Register the callback that generates cookies for TLS 1&period;3 HelloRetryRequest &sol; DTLS cookie exchange&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
SSL&lowbar;CTX&lowbar;set&lowbar;stateless&lowbar;cookie&lowbar;generate&lowbar;cb(
    xref:SSL_CTX.adoc[SSL&lowbar;CTX]* ctx,
    int(* gen&lowbar;stateless&lowbar;cookie&lowbar;cb)(xref:SSL.adoc[SSL]*, unsigned char*, size&lowbar;t*));
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| SSL&lowbar;CTX that will invoke the callback for stateless cookie generation&period;
| *gen&lowbar;stateless&lowbar;cookie&lowbar;cb*
| Callback that writes a cookie into `cookie` and sets `cookie&lowbar;len,` or NULL to clear&period;
|===


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