diff options
-rw-r--r-- | src/cli/speed.cpp | 14 | ||||
-rw-r--r-- | src/lib/tls/msg_client_hello.cpp | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp index 9539e22ec..fa8a09fd7 100644 --- a/src/cli/speed.cpp +++ b/src/cli/speed.cpp @@ -989,9 +989,19 @@ class Speed final : public Command const Botan::SymmetricKey key(rng(), cipher.maximum_keylength()); ks_timer.run([&]() { cipher.set_key(key); }); - for(auto buf_size : buf_sizes) + const size_t bs = cipher.block_size(); + std::set<size_t> buf_sizes_in_blocks; + for(size_t buf_size : buf_sizes) + { + if(buf_size % bs == 0) + buf_sizes_in_blocks.insert(buf_size); + else + buf_sizes_in_blocks.insert(buf_size + bs - (buf_size % bs)); + } + + for(size_t buf_size : buf_sizes_in_blocks) { - std::vector<uint8_t> buffer(buf_size * cipher.block_size()); + std::vector<uint8_t> buffer(buf_size); Timer encrypt_timer(cipher.name(), buffer.size(), "encrypt", provider, buf_size); Timer decrypt_timer(cipher.name(), buffer.size(), "decrypt", provider, buf_size); diff --git a/src/lib/tls/msg_client_hello.cpp b/src/lib/tls/msg_client_hello.cpp index e804a0cf0..e0d3c8b65 100644 --- a/src/lib/tls/msg_client_hello.cpp +++ b/src/lib/tls/msg_client_hello.cpp @@ -92,7 +92,6 @@ Client_Hello::Client_Hello(Handshake_IO& io, */ m_extensions.add(new Extended_Master_Secret); m_extensions.add(new Session_Ticket()); - m_extensions.add(new Certificate_Status_Request); if(policy.negotiate_encrypt_then_mac()) m_extensions.add(new Encrypt_then_MAC); @@ -167,7 +166,6 @@ Client_Hello::Client_Hello(Handshake_IO& io, attempt and upgrade us to a new session with the EMS protection. */ m_extensions.add(new Extended_Master_Secret); - m_extensions.add(new Certificate_Status_Request); m_extensions.add(new Renegotiation_Extension(reneg_info)); m_extensions.add(new Server_Name_Indicator(session.server_info().hostname())); |