aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/msg_server_kex.cpp
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2016-10-03 18:30:11 +0200
committerRenĂ© Korthaus <[email protected]>2016-10-03 18:30:11 +0200
commitee32b15b9c0ac2613052e4e5dc7fc135ad3e8d7b (patch)
tree97f0313428ed212f9220498bbb88749688ae22f2 /src/lib/tls/msg_server_kex.cpp
parentf8c63ad084f75c4a61d396e9228f00424f315de9 (diff)
Minor improvements
Diffstat (limited to 'src/lib/tls/msg_server_kex.cpp')
-rw-r--r--src/lib/tls/msg_server_kex.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/tls/msg_server_kex.cpp b/src/lib/tls/msg_server_kex.cpp
index c44dcb69a..33b980ba9 100644
--- a/src/lib/tls/msg_server_kex.cpp
+++ b/src/lib/tls/msg_server_kex.cpp
@@ -86,14 +86,9 @@ Server_Key_Exchange::Server_Key_Exchange(Handshake_IO& io,
m_params.push_back(get_byte(1, named_curve_id));
// follow client's preference for point compression
- if(state.client_hello()->prefers_compressed_ec_points())
- {
- append_tls_length_value(m_params, ecdh->public_value(PointGFp::COMPRESSED), 1);
- }
- else
- {
- append_tls_length_value(m_params, ecdh->public_value(PointGFp::UNCOMPRESSED), 1);
- }
+ append_tls_length_value(m_params,
+ ecdh->public_value(state.client_hello()->prefers_compressed_ec_points() ?
+ PointGFp::COMPRESSED : PointGFp::UNCOMPRESSED), 1);
m_kex_key.reset(ecdh.release());
}