[#SSL_custom_ext_add_cb_ex]
= SSL&lowbar;custom&lowbar;ext&lowbar;add&lowbar;cb&lowbar;ex
:mrdocs:

Callback that supplies the contents of a custom TLS extension being sent&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
typedef int(* SSL&lowbar;custom&lowbar;ext&lowbar;add&lowbar;cb&lowbar;ex)(xref:SSL.adoc[SSL]*, unsigned int, unsigned int, unsigned char const**, size&lowbar;t*, xref:X509.adoc[X509]*, size&lowbar;t, int*, void*);
----

== Return Value

1 to include the extension, 0 to omit it, or &hyphen;1 to abort with &ast;`al&period;`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| SSL connection constructing the extension&period;
| *ext&lowbar;type*
| TLS extension type code&period;
| *context*
| Bitmask identifying the message and role (SSL&lowbar;EXT&lowbar;&ast;)&period;
| *out*
| Set to point at the extension payload bytes to send&period;
| *outlen*
| Receives the length of &ast;`out&period;`
| *x*
| Certificate associated with this extension when relevant, or NULL&period;
| *chainidx*
| Index of `x` in the certificate chain when applicable&period;
| *al*
| Set to a TLS alert code on failure&period;
| *add&lowbar;arg*
| User argument from SSL&lowbar;CTX&lowbar;add&lowbar;custom&lowbar;ext&period;
|===


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