trimmed some unused code for session tickets

This commit is contained in:
John Safranek 2014-10-06 12:44:52 -07:00
parent 954740e2a8
commit 7c67a9261c
3 changed files with 3 additions and 30 deletions

View File

@ -2066,23 +2066,8 @@ struct CYASSL {
#ifdef HAVE_SECURE_RENEGOTIATION
SecureRenegotiation* secure_renegotiation; /* valid pointer indicates */
#endif /* user turned on */
#ifdef HAVE_SESSION_TICKET
#ifndef NO_CYASSL_CLIENT
/*
Create cantidate_ticket when processing New Session Ticket Handshake
Message. When the ticket is validated at Finished Handshake Message,
move canditate_ticket to session_ticket and call:
TLSX_UseSessionTicket(&ssl->extensions, ssl->session_ticket);
If the session_ticket must be destroyed, call:
TLSX_UseSessionTicket(&ssl->extensions, NULL);
This function doesn't free an early ticket, but will erase it's
reference inside the extensions.
*/
#if !defined(NO_CYASSL_CLIENT) && defined(HAVE_SESSION_TICKET)
byte expect_session_ticket;
SessionTicket* candidate_ticket;
SessionTicket* session_ticket;
#endif
#endif
#endif /* HAVE_TLS_EXTENSIONS */
#ifdef HAVE_NETX

View File

@ -1757,12 +1757,8 @@ int InitSSL(CYASSL* ssl, CYASSL_CTX* ctx)
#ifdef HAVE_SECURE_RENEGOTIATION
ssl->secure_renegotiation = NULL;
#endif
#ifdef HAVE_SESSION_TICKET
#ifndef NO_CYASSL_CLIENT
#if !defined(NO_CYASSL_CLIENT) && defined(HAVE_SESSION_TICKET)
ssl->expect_session_ticket = 0;
ssl->candidate_ticket = NULL;
ssl->session_ticket = NULL;
#endif
#endif
#endif
@ -2020,12 +2016,6 @@ void SSL_ResourceFree(CYASSL* ssl)
#ifdef HAVE_TLS_EXTENSIONS
TLSX_FreeAll(ssl->extensions);
#endif
#ifdef HAVE_SESSION_TICKET
#ifndef NO_CYASSL_CLIENT
TLSX_SessionTicket_Free(ssl->candidate_ticket);
TLSX_SessionTicket_Free(ssl->session_ticket);
#endif
#endif
#ifdef HAVE_NETX
if (ssl->nxCtx.nxPacket)
nx_packet_release(ssl->nxCtx.nxPacket);

View File

@ -797,8 +797,7 @@ int CyaSSL_Rehandshake(CYASSL* ssl)
#endif /* HAVE_SECURE_RENEGOTIATION */
/* Session Ticket */
#ifdef HAVE_SESSION_TICKET
#ifndef NO_CYASSL_CLIENT
#if !defined(NO_CYASSL_CLIENT) && defined(HAVE_SESSION_TICKET)
int CyaSSL_UseSessionTicket(CYASSL* ssl)
{
if (ssl == NULL)
@ -815,7 +814,6 @@ int CyaSSL_CTX_UseSessionTicket(CYASSL_CTX* ctx)
return TLSX_UseSessionTicket(&ctx->extensions, NULL);
}
#endif
#endif
#ifndef CYASSL_LEANPSK