aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_tls_messages.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/tests/test_tls_messages.cpp
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff)
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
Diffstat (limited to 'src/tests/test_tls_messages.cpp')
-rw-r--r--src/tests/test_tls_messages.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/test_tls_messages.cpp b/src/tests/test_tls_messages.cpp
index da6e72f79..250ce23f5 100644
--- a/src/tests/test_tls_messages.cpp
+++ b/src/tests/test_tls_messages.cpp
@@ -24,8 +24,8 @@ Test::Result test_hello_verify_request()
{
Test::Result result("hello_verify_request construction");
- std::vector<byte> test_data;
- std::vector<byte> key_data(32);
+ std::vector<uint8_t> test_data;
+ std::vector<uint8_t> key_data(32);
Botan::SymmetricKey sk(key_data);
// Compute cookie over an empty string with an empty test data
@@ -36,7 +36,7 @@ Test::Result test_hello_verify_request()
hmac->set_key(sk);
hmac->update_be(size_t(0));
hmac->update_be(size_t(0));
- std::vector<byte> test = unlock(hmac->final());
+ std::vector<uint8_t> test = unlock(hmac->final());
result.test_eq("Cookie comparison", hfr.cookie(), test);
return result;
@@ -74,10 +74,10 @@ class TLS_Message_Parsing_Test : public Text_Based_Test
Botan::TLS::Protocol_Version pv(protocol[0], protocol[1]);
Botan::TLS::Client_Hello message(buffer);
result.test_eq("Protocol version", message.version().to_string(), pv.to_string());
- std::vector<byte> buf;
+ std::vector<uint8_t> buf;
for(Botan::TLS::Handshake_Extension_Type const& type : message.extension_types())
{
- Botan::u16bit u16type = type;
+ uint16_t u16type = type;
buf.push_back(Botan::get_byte(0, u16type));
buf.push_back(Botan::get_byte(1, u16type));
}
@@ -99,14 +99,14 @@ class TLS_Message_Parsing_Test : public Text_Based_Test
{
const std::string extensions = get_req_str(vars, "AdditionalData");
Botan::TLS::Protocol_Version pv(protocol[0], protocol[1]);
- Botan::TLS::Ciphersuite cs = Botan::TLS::Ciphersuite::by_id(Botan::make_u16bit(ciphersuite[0], ciphersuite[1]));
+ Botan::TLS::Ciphersuite cs = Botan::TLS::Ciphersuite::by_id(Botan::make_uint16(ciphersuite[0], ciphersuite[1]));
Botan::TLS::Server_Hello message(buffer);
result.test_eq("Protocol version", message.version().to_string(), pv.to_string());
result.confirm("Ciphersuite", (message.ciphersuite() == cs.ciphersuite_code()));
- std::vector<byte> buf;
+ std::vector<uint8_t> buf;
for(Botan::TLS::Handshake_Extension_Type const& type : message.extension_types())
{
- Botan::u16bit u16type = type;
+ uint16_t u16type = type;
buf.push_back(Botan::get_byte(0, u16type));
buf.push_back(Botan::get_byte(1, u16type));
}