[#SSL_SESSION_set_cipher]
= SSL&lowbar;SESSION&lowbar;set&lowbar;cipher
:mrdocs:

Associate a cipher suite with an SSL&lowbar;SESSION (for example when building a PSK session)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
SSL&lowbar;SESSION&lowbar;set&lowbar;cipher(
    xref:SSL_SESSION.adoc[SSL&lowbar;SESSION]* s,
    xref:SSL_CIPHER.adoc[SSL&lowbar;CIPHER] const* cipher);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| Session to update&period;
| *cipher*
| Cipher suite to store on `s&period;`
|===


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