set tag for zero len case

pull/3445/head
Takashi Kojo 2020-10-30 16:13:37 +09:00
parent 68209f91fb
commit 417ff1b0f2
1 changed files with 2 additions and 2 deletions

View File

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