diff options
author | Jack Lloyd <[email protected]> | 2016-12-11 15:28:38 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-18 16:48:24 -0500 |
commit | f3cb3edb512bdcab498d825886c3366c341b3f78 (patch) | |
tree | 645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/tls/tls_alert.cpp | |
parent | c1dd21253c1f3188ff45d3ad47698efd08235ae8 (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/lib/tls/tls_alert.cpp')
-rw-r--r-- | src/lib/tls/tls_alert.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/tls/tls_alert.cpp b/src/lib/tls/tls_alert.cpp index 6cecb3bbe..e1e8c6eb6 100644 --- a/src/lib/tls/tls_alert.cpp +++ b/src/lib/tls/tls_alert.cpp @@ -12,7 +12,7 @@ namespace Botan { namespace TLS { -Alert::Alert(const secure_vector<byte>& buf) +Alert::Alert(const secure_vector<uint8_t>& buf) { if(buf.size() != 2) throw Decoding_Error("Alert: Bad size " + std::to_string(buf.size()) + @@ -23,16 +23,16 @@ Alert::Alert(const secure_vector<byte>& buf) else throw Decoding_Error("Alert: Bad code for alert level"); - const byte dc = buf[1]; + const uint8_t dc = buf[1]; m_type_code = static_cast<Type>(dc); } -std::vector<byte> Alert::serialize() const +std::vector<uint8_t> Alert::serialize() const { - return std::vector<byte>({ - static_cast<byte>(is_fatal() ? 2 : 1), - static_cast<byte>(type()) + return std::vector<uint8_t>({ + static_cast<uint8_t>(is_fatal() ? 2 : 1), + static_cast<uint8_t>(type()) }); } |