From b06cee333c7d6b786a19cffa77ca749d59654f96 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Wed, 27 Nov 2019 17:37:19 +0100 Subject: [PATCH] Add error on EOF --- src/ssl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index a739561d4..6c06c594d 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -35182,6 +35182,9 @@ void* wolfSSL_GetDhAgreeCtx(WOLFSSL* ssl) } if ((l = wolfSSL_BIO_get_len(bp)) <= 0) { + #if defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) + WOLFSSL_ERROR(ASN_NO_PEM_HEADER); + #endif return NULL; }