mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 03:07:29 +02:00
Merge pull request #4880 from julek-wolfssl/plain-alert
Detect if we are processing a plaintext alert
This commit is contained in:
@ -16557,6 +16557,7 @@ static int DoAlert(WOLFSSL* ssl, byte* input, word32* inOutIdx, int* type)
|
|||||||
READ_PROTO, ssl->heap);
|
READ_PROTO, ssl->heap);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (IsEncryptionOn(ssl, 0)) {
|
||||||
#ifndef WOLFSSL_AEAD_ONLY
|
#ifndef WOLFSSL_AEAD_ONLY
|
||||||
if (ssl->specs.cipher_type == block) {
|
if (ssl->specs.cipher_type == block) {
|
||||||
if (ssl->options.tls1_1)
|
if (ssl->options.tls1_1)
|
||||||
@ -16569,8 +16570,6 @@ static int DoAlert(WOLFSSL* ssl, byte* input, word32* inOutIdx, int* type)
|
|||||||
ivExtra = AESGCM_EXP_IV_SZ;
|
ivExtra = AESGCM_EXP_IV_SZ;
|
||||||
}
|
}
|
||||||
dataSz -= ivExtra;
|
dataSz -= ivExtra;
|
||||||
|
|
||||||
if (IsEncryptionOn(ssl, 0)) {
|
|
||||||
dataSz -= ssl->keys.padSz;
|
dataSz -= ssl->keys.padSz;
|
||||||
#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
|
#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
|
||||||
if (ssl->options.startedETMRead)
|
if (ssl->options.startedETMRead)
|
||||||
|
Reference in New Issue
Block a user