diff options
author | René Korthaus <[email protected]> | 2016-10-03 18:30:11 +0200 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-10-03 18:30:11 +0200 |
commit | ee32b15b9c0ac2613052e4e5dc7fc135ad3e8d7b (patch) | |
tree | 97f0313428ed212f9220498bbb88749688ae22f2 /src/lib/tls/tls_extensions.cpp | |
parent | f8c63ad084f75c4a61d396e9228f00424f315de9 (diff) |
Minor improvements
Diffstat (limited to 'src/lib/tls/tls_extensions.cpp')
-rw-r--r-- | src/lib/tls/tls_extensions.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/lib/tls/tls_extensions.cpp b/src/lib/tls/tls_extensions.cpp index d82df20c5..df265d915 100644 --- a/src/lib/tls/tls_extensions.cpp +++ b/src/lib/tls/tls_extensions.cpp @@ -358,18 +358,10 @@ Supported_Elliptic_Curves::Supported_Elliptic_Curves(TLS_Data_Reader& reader, std::vector<byte> Supported_Point_Formats::serialize() const { - std::vector<byte> buf(1); - // if we send this extension, we prefer compressed points, // otherwise we don't send it (which is equal to supporting only uncompressed) - buf.push_back(ANSIX962_COMPRESSED_PRIME); - // if this extension is sent, it MUST include uncompressed (RFC 4492, section 5.1) - buf.push_back(UNCOMPRESSED); - - buf[0] = static_cast<byte>(buf.size()-1); - - return buf; + return std::vector<byte>{2, ANSIX962_COMPRESSED_PRIME, UNCOMPRESSED}; } Supported_Point_Formats::Supported_Point_Formats(TLS_Data_Reader& reader, |