From: "plaisthos (Code Review)" Date: Mon, 20 Nov 2023 11:28:00 +0000 References: Reply-To: arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <3294243313900bdfd258abc4d47910884fa3aab9-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="cSlFO7YydM0="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Log SSL alerts more prominently List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: openvpn-devel --cSlFO7YydM0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/448?usp=3Demail to review the following change. Change subject: Log SSL alerts more prominently ...................................................................... Log SSL alerts more prominently When we receive an SSL alert from a server we currently only log a very cryptic OpenSSL error message: OpenSSL: error:0A00042E:SSL routines::tlsv1 alert protocol version:SSL a= lert number 70 This also enables logging the much more readable SSL error message: Received fatal SSL alert: protocol version which previously needed --verb 8 to be displayed (now verb 3). Also rework = the message to be better readable. Change-Id: I6bdab3028c9bd679c31d4177a746a3ea505dcbbf Signed-off-by: Arne Schwabe --- M src/openvpn/ssl_openssl.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/48/448/1 diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 23e7623..82872bf 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -196,8 +196,8 @@ } else if (where & SSL_CB_ALERT) { - dmsg(D_HANDSHAKE_VERBOSE, "SSL alert (%s): %s: %s", - where & SSL_CB_READ ? "read" : "write", + dmsg(D_TLS_DEBUG_LOW, "%s %s SSL alert: %s", + where & SSL_CB_READ ? "Received" : "Sent", SSL_alert_type_string_long(ret), SSL_alert_desc_string_long(ret)); } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/448?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I6bdab3028c9bd679c31d4177a746a3ea505dcbbf Gerrit-Change-Number: 448 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --cSlFO7YydM0= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld.

plaisthos would like flichtenheld to review this change.

Vi= ew Change

Log SSL alerts more prominently

When we receive an SSL= alert from a server we currently only log a
very cryptic OpenSSL error = message:

OpenSSL: error:0A00042E:SSL routines::tlsv1 alert protoc= ol version:SSL alert number 70

This also enables logging the much mo= re readable SSL error message:

Received fatal SSL alert: protocol= version

which previously needed --verb 8 to be displayed (now verb = 3). Also rework the
message to be better readable.

Change-Id: I6b= dab3028c9bd679c31d4177a746a3ea505dcbbf
Signed-off-by: Arne Schwabe <a= rne@...1227...>
---
M src/openvpn/ssl_openssl.c
1 file changed,= 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.ne=
t:29418/openvpn refs/changes/48/448/1
diff --git a/src/openvpn/ssl_=
openssl.c b/src/openvpn/ssl_openssl.c
index 23e7623..82872b= f 100644
--- a/src/openvpn/ssl_openssl.c
++= + b/src/openvpn/ssl_openssl.c
@@ -196,8 +196,8 @@ }
else if (where & SSL_CB_ALERT)
{
- = dmsg(D_HANDSHAKE_VERBOSE, "SSL alert (%s): %s: %s",- where & SSL_CB= _READ ? "read" : "write",
+ dmsg(D_TLS_DEBUG_LOW, "%s %s SSL ale= rt: %s",
+ = where & SSL_CB_READ ? "Received" : "Sent",
SSL_alert_type_string_long(ret),
SSL_alert_desc_string_long(ret));

}

To view, visit change 448. To unsubscribe, or= for help writing mail filters, visit settings.

<= /div>
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6bdab3028c9bd679c31d4177a74= 6a3ea505dcbbf
Gerrit-Change-Number: 448
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--cSlFO7YydM0=--