SSL_set_session.pod revision 72613
168651Skris=pod 268651Skris 368651Skris=head1 NAME 468651Skris 568651SkrisSSL_set_session - set a TLS/SSL session to be used during TLS/SSL connect 668651Skris 768651Skris=head1 SYNOPSIS 868651Skris 968651Skris #include <openssl/ssl.h> 1068651Skris 1168651Skris int SSL_set_session(SSL *ssl, SSL_SESSION *session); 1268651Skris 1368651Skris=head1 DESCRIPTION 1468651Skris 1568651SkrisSSL_set_session() sets B<session> to be used when the TLS/SSL connection 1668651Skrisis to be established. SSL_set_session() is only useful for TLS/SSL clients. 1768651SkrisWhen the session is set, the reference count of B<session> is incremented 1868651Skrisby 1. If the session is not reused, the reference count is decremented 1968651Skrisagain during SSL_connect(). 2068651Skris 2168651SkrisIf there is already a session set inside B<ssl> (because it was set with 2268651SkrisSSL_set_session() before or because the same B<ssl> was already used for 2368651Skrisa connection), SSL_SESSION_free() will be called for that session. 2468651Skris 2568651Skris=head1 RETURN VALUES 2668651Skris 2768651SkrisThe following return values can occur: 2868651Skris 2968651Skris=over 4 3068651Skris 3168651Skris=item 0 3268651Skris 3368651SkrisThe operation failed; check the error stack to find out the reason. 3468651Skris 3568651Skris=item 1 3668651Skris 3768651SkrisThe operation succeeded. 3868651Skris 3968651Skris=back 4068651Skris 4168651Skris=head1 SEE ALSO 4268651Skris 4372613SkrisL<ssl(3)|ssl(3)>, L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>, 4472613SkrisL<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)> 4568651Skris 4668651Skris=cut 47