From d6e22346e3e585e511f9e3e12129cdcb73da4234 Mon Sep 17 00:00:00 2001 From: Go Hosohara Date: Sun, 30 Jul 2017 18:00:12 +0900 Subject: [PATCH] Regarding with commit #4899aad884880bb8ef1859ea6b57eded013cd2b4, send no certificate alert only if SSLv3, otherwise proceed with size 0 certificate. --- src/internal.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/internal.c b/src/internal.c index 27b03d6c7..872f78652 100644 --- a/src/internal.c +++ b/src/internal.c @@ -13206,9 +13206,18 @@ int SendCertificate(WOLFSSL* ssl) return 0; /* not needed */ if (ssl->options.sendVerify == SEND_BLANK_CERT) { - SendAlert(ssl, alert_warning, no_certificate); - return 0; - } + if (ssl->version.major == SSLv3_MAJOR + && ssl->version.minor == SSLv3_MINOR){ + SendAlert(ssl, alert_warning, no_certificate); + return 0; + } else { + certSz = 0; + certChainSz = 0; + headerSz = CERT_HEADER_SZ; + length = CERT_HEADER_SZ; + listSz = 0; + } + } else { if (!ssl->buffers.certificate) { WOLFSSL_MSG("Send Cert missing certificate buffer");