tls-peer: Don't log anything if we are not sending supported groups

This commit is contained in:
Tobias Brunner 2021-01-14 16:14:47 +01:00
parent 8cf3998f1a
commit 7b64880a8c
1 changed files with 4 additions and 2 deletions

View File

@ -1326,8 +1326,6 @@ static status_t send_client_hello(private_tls_peer_t *this,
names->destroy(names);
}
DBG2(DBG_TLS, "sending extension: %N",
tls_extension_names, TLS_EXT_SUPPORTED_GROUPS);
enumerator = this->crypto->create_ec_enumerator(this->crypto);
while (enumerator->enumerate(enumerator, &group, &curve))
{
@ -1351,8 +1349,12 @@ static status_t send_client_hello(private_tls_peer_t *this,
curves->write_uint16(curves, curve);
}
enumerator->destroy(enumerator);
if (curves)
{
DBG2(DBG_TLS, "sending extension: %N",
tls_extension_names, TLS_EXT_SUPPORTED_GROUPS);
curves->wrap16(curves);
extensions->write_data16(extensions, curves->get_buf(curves));
curves->destroy(curves);