mirror of https://github.com/wolfSSL/wolfssl.git
SslSessionCacheOn -> SslSessionCacheOff
parent
2cd499d2df
commit
e583d0ab76
15
src/ssl.c
15
src/ssl.c
|
@ -14072,20 +14072,17 @@ static WC_INLINE void RestoreSession(WOLFSSL* ssl, WOLFSSL_SESSION* session,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SslSessionCacheOn(const WOLFSSL* ssl, const WOLFSSL_SESSION* session)
|
static int SslSessionCacheOff(const WOLFSSL* ssl, const WOLFSSL_SESSION* session)
|
||||||
{
|
{
|
||||||
(void)session;
|
(void)session;
|
||||||
if (ssl->options.sessionCacheOff
|
return ssl->options.sessionCacheOff
|
||||||
#if defined(HAVE_SESSION_TICKET) && defined(WOLFSSL_FORCE_CACHE_ON_TICKET)
|
#if defined(HAVE_SESSION_TICKET) && defined(WOLFSSL_FORCE_CACHE_ON_TICKET)
|
||||||
&& session->ticketLen == 0
|
&& session->ticketLen == 0
|
||||||
#endif
|
#endif
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
&& ssl->options.side != WOLFSSL_CLIENT_END
|
&& ssl->options.side != WOLFSSL_CLIENT_END
|
||||||
#endif
|
#endif
|
||||||
)
|
;
|
||||||
return WOLFSSL_FAILURE;
|
|
||||||
else
|
|
||||||
return WOLFSSL_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WOLFSSL_SESSION* GetSession(WOLFSSL* ssl, byte* masterSecret,
|
WOLFSSL_SESSION* GetSession(WOLFSSL* ssl, byte* masterSecret,
|
||||||
|
@ -14100,7 +14097,7 @@ WOLFSSL_SESSION* GetSession(WOLFSSL* ssl, byte* masterSecret,
|
||||||
|
|
||||||
(void) restoreSessionCerts;
|
(void) restoreSessionCerts;
|
||||||
|
|
||||||
if (!SslSessionCacheOn(ssl, &ssl->session))
|
if (SslSessionCacheOff(ssl, &ssl->session))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (ssl->options.haveSessionId == 0)
|
if (ssl->options.haveSessionId == 0)
|
||||||
|
@ -14306,7 +14303,7 @@ static int GetDeepCopySession(WOLFSSL* ssl, WOLFSSL_SESSION* copyFrom)
|
||||||
|
|
||||||
int SetSession(WOLFSSL* ssl, WOLFSSL_SESSION* session)
|
int SetSession(WOLFSSL* ssl, WOLFSSL_SESSION* session)
|
||||||
{
|
{
|
||||||
if (ssl == NULL || !SslSessionCacheOn(ssl, session))
|
if (ssl == NULL || SslSessionCacheOff(ssl, session))
|
||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
|
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
|
@ -14371,7 +14368,7 @@ int AddSession(WOLFSSL* ssl)
|
||||||
int cbRet = 0;
|
int cbRet = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!SslSessionCacheOn(ssl, &ssl->session))
|
if (SslSessionCacheOff(ssl, &ssl->session))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (ssl->options.haveSessionId == 0)
|
if (ssl->options.haveSessionId == 0)
|
||||||
|
|
Loading…
Reference in New Issue