diff options
author | Jack Lloyd <[email protected]> | 2016-11-18 15:05:05 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-18 15:05:05 -0500 |
commit | 2031d93f0c07e0f310cb1366a07a8350301f19b0 (patch) | |
tree | 65f299ec9c70afce83e86c81e72e437bdb6ede55 /src/tests/unit_tls.cpp | |
parent | 97df0c27b878d77799353ccc9eda9705b1ec1fa4 (diff) |
Fix TLS test
It is allowable to request the maximum length, just not more than it.
Found after about 22K runs of the TLS tests.
Diffstat (limited to 'src/tests/unit_tls.cpp')
-rw-r--r-- | src/tests/unit_tls.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp index 4ebc54252..8df963d9e 100644 --- a/src/tests/unit_tls.cpp +++ b/src/tests/unit_tls.cpp @@ -413,7 +413,7 @@ Test::Result test_tls_handshake(Botan::TLS::Protocol_Version offer_version, size_t total_consumed = needed; while(needed > 0 && - result.test_lt("Never requesting more than max protocol len", needed, 18*1024) && + result.test_lt("Never requesting more than max protocol len", needed, Botan::TLS::MAX_CIPHERTEXT_SIZE+1) && result.test_lt("Total requested is readonable", total_consumed, 128*1024)) { input.resize(needed); @@ -443,7 +443,7 @@ Test::Result test_tls_handshake(Botan::TLS::Protocol_Version offer_version, size_t total_consumed = 0; - while(needed > 0 && result.test_lt("Never requesting more than max protocol len", needed, 18*1024)) + while(needed > 0 && result.test_lt("Never requesting more than max protocol len", needed, Botan::TLS::MAX_CIPHERTEXT_SIZE+1)) { input.resize(needed); rng.randomize(input.data(), input.size()); @@ -698,7 +698,7 @@ Test::Result test_dtls_handshake(Botan::TLS::Protocol_Version offer_version, input = Test::mutate_vec(input, true, 5); size_t needed = server->received_data(input.data(), input.size()); - if(needed > 0 && result.test_lt("Never requesting more than max protocol len", needed, 18*1024)) + if(needed > 0 && result.test_lt("Never requesting more than max protocol len", needed, Botan::TLS::MAX_CIPHERTEXT_SIZE+1)) { input.resize(needed); rng.randomize(input.data(), input.size()); @@ -738,7 +738,7 @@ Test::Result test_dtls_handshake(Botan::TLS::Protocol_Version offer_version, input = Test::mutate_vec(input, true, 5); size_t needed = client->received_data(input.data(), input.size()); - if(needed > 0 && result.test_lt("Never requesting more than max protocol len", needed, 18*1024)) + if(needed > 0 && result.test_lt("Never requesting more than max protocol len", needed, Botan::TLS::MAX_CIPHERTEXT_SIZE+1)) { input.resize(needed); rng.randomize(input.data(), input.size()); |