mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-05 13:44:41 +02:00
add tiket key cleanup to help valgrind
This commit is contained in:
@@ -67,8 +67,9 @@
|
|||||||
#if defined(HAVE_SESSION_TICKET) && defined(HAVE_CHACHA) && \
|
#if defined(HAVE_SESSION_TICKET) && defined(HAVE_CHACHA) && \
|
||||||
defined(HAVE_POLY1305)
|
defined(HAVE_POLY1305)
|
||||||
#include <wolfssl/wolfcrypt/chacha20_poly1305.h>
|
#include <wolfssl/wolfcrypt/chacha20_poly1305.h>
|
||||||
static int TicketInit(void);
|
static int TicketInit(void);
|
||||||
static int myTicketEncCb(WOLFSSL* ssl, byte key_name[16], byte iv[16],
|
static void TicketCleanup(void);
|
||||||
|
static int myTicketEncCb(WOLFSSL* ssl, byte key_name[16], byte iv[16],
|
||||||
byte mac[32], int enc, byte* ticket, int inLen,
|
byte mac[32], int enc, byte* ticket, int inLen,
|
||||||
int* outLen);
|
int* outLen);
|
||||||
#endif
|
#endif
|
||||||
@@ -664,6 +665,11 @@ while (1) { /* allow resume option */
|
|||||||
fdCloseSession(Task_self());
|
fdCloseSession(Task_self());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_SESSION_TICKET) && defined(HAVE_CHACHA) && \
|
||||||
|
defined(HAVE_POLY1305)
|
||||||
|
TicketCleanup();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CYASSL_TIRTOS
|
#ifndef CYASSL_TIRTOS
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -773,6 +779,11 @@ while (1) { /* allow resume option */
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void TicketCleanup(void)
|
||||||
|
{
|
||||||
|
wc_FreeRng(&rng);
|
||||||
|
}
|
||||||
|
|
||||||
static int myTicketEncCb(WOLFSSL* ssl,
|
static int myTicketEncCb(WOLFSSL* ssl,
|
||||||
byte key_name[WOLFSSL_TICKET_NAME_SZ],
|
byte key_name[WOLFSSL_TICKET_NAME_SZ],
|
||||||
byte iv[WOLFSSL_TICKET_IV_SZ],
|
byte iv[WOLFSSL_TICKET_IV_SZ],
|
||||||
|
Reference in New Issue
Block a user