From 93326a7aeb46c48c1b61aec0077cb6a298c98908 Mon Sep 17 00:00:00 2001 From: Stanislav Klima Date: Tue, 10 Mar 2020 09:55:27 +0100 Subject: [PATCH] Changed dst NULL check. --- src/ssl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ssl.c b/src/ssl.c index b418f7f80..e7d099a10 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -17094,7 +17094,11 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD *md) int ret = 0; WOLFSSL_ENTER("wolfSSL_EVP_Cipher"); - if (ctx == NULL || dst == NULL || src == NULL) { + if (ctx == NULL || src == NULL || + (dst == NULL && + ctx->cipherType != AES_128_GCM_TYPE && + ctx->cipherType != AES_192_GCM_TYPE && + ctx->cipherType != AES_256_GCM_TYPE)) { WOLFSSL_MSG("Bad function argument"); return 0; /* failure */ }