[#SSL_bytes_to_cipher_list]
= SSL&lowbar;bytes&lowbar;to&lowbar;cipher&lowbar;list
:mrdocs:

Parse a wire&hyphen;format cipher suite list into SSL&lowbar;CIPHER and SCSV stacks&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
SSL&lowbar;bytes&lowbar;to&lowbar;cipher&lowbar;list(
    xref:SSL.adoc[SSL]* s,
    unsigned char const* bytes,
    size&lowbar;t len,
    int isv2format,
    stack&lowbar;st&lowbar;SSL&lowbar;CIPHER** sk,
    stack&lowbar;st&lowbar;SSL&lowbar;CIPHER** scsvs);
----

== Return Value

1 on success, or 0 on failure&semi; unsupported suites are ignored&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| SSL object used to resolve suite IDs against the library&apos;s known ciphers&period;
| *bytes*
| Wire encoding of cipher suites (2 octets each for TLS, or 3 for SSLv2 format)&period;
| *len*
| Length of `bytes&period;`
| *isv2format*
| Non&hyphen;zero if `bytes` uses the three&hyphen;octet SSLv2 cipher format&period;
| *sk*
| On success, receives a new stack of supported SSL&lowbar;CIPHER objects (caller frees)&period;
| *scsvs*
| On success, receives a new stack of signalling cipher suite values (caller frees)&period;
|===


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