SSL_CTX_ADD_SESSION(3) | OpenSSL | SSL_CTX_ADD_SESSION(3) |
#include <openssl/ssl.h> int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c); int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c);
SSL_CTX_remove_session() removes the session c from the context ctx and marks it as non-resumable. SSL_SESSION_free(3) is called once for c.
If a server SSL_CTX is configured with the SSL_SESS_CACHE_NO_INTERNAL_STORE flag then the internal cache will not be populated automatically by new sessions negotiated by the SSL/TLS implementation, even though the internal cache will be searched automatically for session-resume requests (the latter can be suppressed by SSL_SESS_CACHE_NO_INTERNAL_LOOKUP). So the application can use SSL_CTX_add_session() directly to have full control over the sessions that can be resumed if desired.
Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
2023-02-07 | 1.1.1t |