only alloc poly auth size if cipher suite needs it

This commit is contained in:
toddouska
2015-03-27 15:38:01 -07:00
parent e66aa9885f
commit 32c9f00189

View File

@ -2366,7 +2366,7 @@ int SetKeysSide(WOLFSSL* ssl, enum encrypt_side side)
}
#ifdef HAVE_ONE_TIME_AUTH
if (!ssl->auth.setup) {
if (!ssl->auth.setup && ssl->specs.bulk_cipher_algorithm == wolfssl_chacha){
ret = SetAuthKeys(&ssl->auth, keys, &ssl->specs, ssl->heap, devId);
if (ret != 0)
return ret;