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

Set the callback that generates DTLS HelloVerifyRequest cookies&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;cookie&lowbar;generate&lowbar;cb(
    xref:SSL_CTX.adoc[SSL&lowbar;CTX]* ctx,
    int(* app&lowbar;gen&lowbar;cookie&lowbar;cb)(xref:SSL.adoc[SSL]*, unsigned char*, unsigned int*));
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| DTLS SSL context that uses DTLSv1&lowbar;listen&period;
| *app&lowbar;gen&lowbar;cookie&lowbar;cb*
| Callback that writes at most DTLS1&lowbar;COOKIE&lowbar;LENGTH bytes into cookie and sets cookie&lowbar;len&period;
|===


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