[#SSL_CTX_add_session]
= SSL&lowbar;CTX&lowbar;add&lowbar;session
:mrdocs:

Add a session to an SSL context&apos;s internal session cache&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
SSL&lowbar;CTX&lowbar;add&lowbar;session(
    xref:SSL_CTX.adoc[SSL&lowbar;CTX]* ctx,
    xref:SSL_SESSION.adoc[SSL&lowbar;SESSION]* session);
----

== Return Value

1 on success, or 0 if the session was already present or on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| SSL context whose cache receives `session&period;`
| *session*
| Session to cache&semi; reference count is incremented on success&period;
|===


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