diff --git a/src/internal.c b/src/internal.c index b6c96b330..d092c3eff 100644 --- a/src/internal.c +++ b/src/internal.c @@ -13205,11 +13205,8 @@ int SendCertificate(WOLFSSL* ssl) return 0; /* not needed */ if (ssl->options.sendVerify == SEND_BLANK_CERT) { - certSz = 0; - certChainSz = 0; - headerSz = CERT_HEADER_SZ; - length = CERT_HEADER_SZ; - listSz = 0; + SendAlert(ssl, alert_warning, no_certificate); + return 0; } else { if (!ssl->buffers.certificate) {