Merge pull request #5862 from JacobBarthelmeh/Compatibility-Layer

map SSL_CTX_get_session_cache_mode compat API
This commit is contained in:
David Garske
2022-12-07 14:50:31 -08:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@ -7229,6 +7229,9 @@ static void test_wolfSSL_CTX_add_session_ctx_ready(WOLFSSL_CTX* ctx)
/* Don't store sessions. Lookup is still enabled. */
AssertIntEQ(wolfSSL_CTX_set_session_cache_mode(ctx,
WOLFSSL_SESS_CACHE_NO_INTERNAL_STORE), WOLFSSL_SUCCESS);
AssertIntEQ(wolfSSL_CTX_get_session_cache_mode(ctx) &
WOLFSSL_SESS_CACHE_NO_INTERNAL_STORE,
WOLFSSL_SESS_CACHE_NO_INTERNAL_STORE);
/* Require both peers to provide certs */
wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_PEER, NULL);
}

View File

@ -307,8 +307,8 @@ typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
#define SSL_get_session(x) wolfSSL_get_session((WOLFSSL*) (x))
#define SSL_SESSION_get0_peer wolfSSL_SESSION_get0_peer
#define SSL_flush_sessions wolfSSL_flush_sessions
/* assume unlimited temporarily */
#define SSL_CTX_get_session_cache_mode(ctx) 0
#define SSL_CTX_get_session_cache_mode(ctx) \
wolfSSL_CTX_get_session_cache_mode((ctx))
#define SSL_CTX_set_verify wolfSSL_CTX_set_verify
#define SSL_CTX_set_cert_verify_callback wolfSSL_CTX_set_cert_verify_callback