Merge pull request #1827 from kaleb-himes/CPP_POLY1305

Fix for HAVE_POLY1305 without one time auth
This commit is contained in:
David Garske
2018-09-11 10:00:39 -07:00
committed by GitHub

View File

@ -1698,7 +1698,7 @@ void InitCiphers(WOLFSSL* ssl)
ssl->encrypt.chacha = NULL;
ssl->decrypt.chacha = NULL;
#endif
#ifdef HAVE_POLY1305
#if defined(HAVE_POLY1305) && defined(HAVE_ONE_TIME_AUTH)
ssl->auth.poly1305 = NULL;
#endif
ssl->encrypt.setup = 0;
@ -1757,7 +1757,7 @@ void FreeCiphers(WOLFSSL* ssl)
XFREE(ssl->encrypt.chacha, ssl->heap, DYNAMIC_TYPE_CIPHER);
XFREE(ssl->decrypt.chacha, ssl->heap, DYNAMIC_TYPE_CIPHER);
#endif
#ifdef HAVE_POLY1305
#if defined(HAVE_POLY1305) && defined(HAVE_ONE_TIME_AUTH)
XFREE(ssl->auth.poly1305, ssl->heap, DYNAMIC_TYPE_CIPHER);
#endif
#ifdef HAVE_IDEA