SSL_CTX_sess_set_new_cb

Set the callback invoked when a new session is negotiated for caching.

Synopsis

Declared in <openssl/ssl.h>

void
SSL_CTX_sess_set_new_cb(
    SSL_CTX* ctx,
    int(* new_session_cb)(ssl_st*, SSL_SESSION*));

Parameters

NameDescription
ctxSSL context (typically a server) that receives new sessions.
new_session_cbCallback receiving the SSL and session; return 1 to retain a reference, or 0 to discard.