diff --git a/src/internal.c b/src/internal.c index 8ccbdc6be..4385b05a2 100644 --- a/src/internal.c +++ b/src/internal.c @@ -17522,7 +17522,7 @@ int SendAlert(WOLFSSL* ssl, int severity, int type) /* only send encrypted alert if handshake actually complete, otherwise other side may not be able to handle it */ if (IsEncryptionOn(ssl, 1) && (IsAtLeastTLSv1_3(ssl->version) || - ssl->options.handShakeDone)) { + ssl->encrypt.setup)) { sendSz = BuildMessage(ssl, output, outputSz, input, ALERT_SIZE, alert, 0, 0, 0); }