[#SSL_SESSION_set1_id]
= SSL&lowbar;SESSION&lowbar;set1&lowbar;id
:mrdocs:

Set the session ID bytes stored on an SSL&lowbar;SESSION&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
SSL&lowbar;SESSION&lowbar;set1&lowbar;id(
    xref:SSL_SESSION.adoc[SSL&lowbar;SESSION]* s,
    unsigned char const* sid,
    unsigned int sid&lowbar;len);
----

== Return Value

1 on success, or 0 on failure (for example if `sid&lowbar;len` is too large)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| Session to update&period;
| *sid*
| Session ID bytes to copy&period;
| *sid&lowbar;len*
| Length of `sid` (must not exceed SSL&lowbar;MAX&lowbar;SSL&lowbar;SESSION&lowbar;ID&lowbar;LENGTH)&period;
|===


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