set tag for zero len case

This commit is contained in:
Takashi Kojo
2020-10-30 16:13:37 +09:00
parent 68209f91fb
commit 417ff1b0f2

View File

@ -770,8 +770,8 @@ int wolfSSL_EVP_CipherFinal(WOLFSSL_EVP_CIPHER_CTX *ctx,
case AES_128_GCM_TYPE: case AES_128_GCM_TYPE:
case AES_192_GCM_TYPE: case AES_192_GCM_TYPE:
case AES_256_GCM_TYPE: case AES_256_GCM_TYPE:
if (ctx->gcmBuffer && if ((ctx->gcmBuffer && ctx->gcmBufferLen > 0)
ctx->gcmBufferLen > 0) { || (ctx->gcmBuffer == NULL && ctx->gcmBufferLen == 0)) {
ret = 0; ret = 0;
if (ctx->gcmAuthIn) { if (ctx->gcmAuthIn) {
/* authenticated, non-confidential data*/ /* authenticated, non-confidential data*/