Merge pull request #2974 from SparkiDev/tls13_enc_alert

If encryption setup, TLS 1.3 alerts encrypted
This commit is contained in:
toddouska
2020-05-19 15:48:54 -07:00
committed by GitHub

View File

@ -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);
}