Merge pull request #1144 from kaleb-himes/FIPS-TEST

NULL plaintext input is supported in FIPS testing
This commit is contained in:
dgarske
2017-09-15 13:21:32 -07:00
committed by GitHub

View File

@ -54,7 +54,7 @@
}
int wc_HmacUpdate(Hmac* hmac, const byte* in, word32 sz)
{
if (hmac == NULL || in == NULL) {
if (hmac == NULL || (in == NULL && sz > 0)) {
return BAD_FUNC_ARG;
}
@ -523,7 +523,7 @@ int wc_HmacUpdate(Hmac* hmac, const byte* msg, word32 length)
{
int ret = 0;
if (hmac == NULL) {
if (hmac == NULL || (msg == NULL && length > 0)) {
return BAD_FUNC_ARG;
}