mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
non block type ciphertext sanity checks
This commit is contained in:
@@ -3046,6 +3046,15 @@ static int SanityCheckCipherText(CYASSL* ssl, word32 encryptSz)
|
|||||||
minLength = ssl->specs.hash_size + 1; /* pad byte */
|
minLength = ssl->specs.hash_size + 1; /* pad byte */
|
||||||
if (ssl->specs.block_size > minLength)
|
if (ssl->specs.block_size > minLength)
|
||||||
minLength = ssl->specs.block_size;
|
minLength = ssl->specs.block_size;
|
||||||
|
|
||||||
|
if (ssl->options.tls1_1)
|
||||||
|
minLength += ssl->specs.block_size; /* explicit IV */
|
||||||
|
}
|
||||||
|
else if (ssl->specs.cipher_type == stream) {
|
||||||
|
minLength = ssl->specs.hash_size;
|
||||||
|
}
|
||||||
|
else if (ssl->specs.cipher_type == aead) {
|
||||||
|
minLength = ssl->specs.block_size; /* actual min? */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encryptSz < minLength) {
|
if (encryptSz < minLength) {
|
||||||
|
Reference in New Issue
Block a user