From: Tobias Brunner Date: Thu, 14 Jan 2021 15:14:47 +0000 (+0100) Subject: tls-peer: Don't log anything if we are not sending supported groups X-Git-Tag: 5.9.2rc1~23^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b64880a8c5a2ff5cd1f0827d81465f9b6064055;p=thirdparty%2Fstrongswan.git tls-peer: Don't log anything if we are not sending supported groups --- diff --git a/src/libtls/tls_peer.c b/src/libtls/tls_peer.c index 987bd51524..9d797f34b6 100644 --- a/src/libtls/tls_peer.c +++ b/src/libtls/tls_peer.c @@ -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);