Skip to content

Commit 803b17a

Browse files
committed
src/ssl_crypto.c: in wolfSSL_CMAC_CTX_free(), gate wc_CmacFree() on !FIPS || FIPS>=5.3.
1 parent 106e39b commit 803b17a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/ssl_crypto.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,9 @@ void wolfSSL_CMAC_CTX_free(WOLFSSL_CMAC_CTX *ctx)
21062106
if (ctx != NULL) {
21072107
/* Deallocate dynamically allocated fields. */
21082108
if (ctx->internal != NULL) {
2109+
#if (!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
21092110
wc_CmacFree((Cmac*)ctx->internal);
2111+
#endif
21102112
XFREE(ctx->internal, NULL, DYNAMIC_TYPE_CMAC);
21112113
}
21122114
if (ctx->cctx != NULL) {

0 commit comments

Comments
 (0)