[#SSL_CTX_set_alpn_protos]
= SSL&lowbar;CTX&lowbar;set&lowbar;alpn&lowbar;protos
:mrdocs:

Set the ALPN protocol list advertised or offered by an SSL context&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;alpn&lowbar;protos(
    xref:SSL_CTX.adoc[SSL&lowbar;CTX]* ctx,
    unsigned char const* protos,
    unsigned int protos&lowbar;len);
----

== Return Value

0 on success, or non&hyphen;zero on failure (inverted success convention)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| SSL context to configure&period;
| *protos*
| Wire&hyphen;format protocol list (length&hyphen;prefixed names)&semi; empty clears ALPN&period;
| *protos&lowbar;len*
| Length of `protos` in bytes&period;
|===


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