From: "cron2 (Code Review)" Date: Tue, 26 Mar 2024 13:13:45 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., a@...2181... Message-ID: <17c327840097985bc599746a8e4bc7347242ac82-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="+z3B/OMIJLM="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Add bracket in fingerprint message and do not warn about missing veri... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --+z3B/OMIJLM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/54= 6?usp=3Demail ) Change subject: Add bracket in fingerprint message and do not warn about mi= ssing verification ...................................................................... Add bracket in fingerprint message and do not warn about missing verificati= on Github: fixes OpenVPN/openvpn#516 Change-Id: Ia73d53002f4ba2658af18c17cce1b68f79de5781 Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld Message-Id: <20240326103853.494572-1-frank@...2641...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28= 474.html Signed-off-by: Gert Doering --- M src/openvpn/init.c M src/openvpn/ssl_verify.c 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index f2ce926..02205e7 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -3594,7 +3594,8 @@ && !o->tls_verify && o->verify_x509_type =3D=3D VERIFY_X509_NONE && !(o->ns_cert_type & NS_CERT_CHECK_SERVER) - && !o->remote_cert_eku) + && !o->remote_cert_eku + && !(o->verify_hash_depth =3D=3D 0 && o->verify_hash)) { msg(M_WARN, "WARNING: No server certificate verification method ha= s been enabled. See http://openvpn.net/howto.html#mitm for more info."); } diff --git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c index c7d7799..930769b 100644 --- a/src/openvpn/ssl_verify.c +++ b/src/openvpn/ssl_verify.c @@ -718,8 +718,8 @@ const char *hex_fp =3D format_hex_ex(BPTR(&cert_fp), BLEN(&cer= t_fp), 0, 1, ":", &gc); msg(D_TLS_ERRORS, "TLS Error: --tls-verify/--peer-fingerprint" - "certificate hash verification failed. (got " - "fingerprint: %s", hex_fp); + "certificate hash verification failed. (got certificate " + "fingerprint: %s)", hex_fp); goto cleanup; } } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/546?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: Ia73d53002f4ba2658af18c17cce1b68f79de5781 Gerrit-Change-Number: 546 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-CC: ordex Gerrit-MessageType: merged --+z3B/OMIJLM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 submitted this change.

View Change

Add bracket in fingerprint message and do not =
warn about missing verification

Github: fixes OpenVPN/openvpn#516
Change-Id: Ia73d53002f4ba2658af18c17cce1b68f79de5781
Signed-off-by:= Arne Schwabe <arne-openvpn@...1227...>
Acked-by: Frank Lichtenhel= d <frank@...2641...>
Message-Id: <20240326103853.494572-1-frank= @...2641...>
URL: https://www.mail-archive.com/openvpn-devel@...1466...= urceforge.net/msg28474.html
Signed-off-by: Gert Doering <gert@...1726...= ...>
---
M src/openvpn/init.c
M src/openvpn/ssl_verify.c
2 f= iles changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/openvpn/init.c b/src/openvpn/init.c
ind= ex f2ce926..02205e7 100644
--- a/src/openvpn/init.c<= br>+++ b/src/openvpn/init.c
@@ -3594,7 +3594,8 @@

&& !o->tls_verify
= && o->verify_x509_type =3D=3D VERIFY_X509_NONE
= && !(o->ns_cert_type & NS_CERT_CHECK_SERVER)=
- && !o->re= mote_cert_eku)
+ = && !o->remote_cert_eku
+ && !(o->verify_hash_depth =3D=3D 0 &= ;& o->verify_hash))
{
= msg(M_WARN, "WARNING: No server certificate verification method has be= en enabled. See http://openvpn.net/howto.html#mitm for more info.");<= /span>
}
diff --git a/src/openvpn/ssl_verify.= c b/src/openvpn/ssl_verify.c
index c7d7799..930769b 100644<= /span>
--- a/src/openvpn/ssl_verify.c
+++ b/src/op= envpn/ssl_verify.c
@@ -718,8 +718,8 @@
= const char *hex_fp =3D format_hex_ex(BPTR(&cert_fp), BLEN(&= ;cert_fp),
= 0, 1, ":", &gc);
msg(D_TLS_ERROR= S, "TLS Error: --tls-verify/--peer-fingerprint"
- "certificate hash = verification failed. (got "
- "fingerprint: %s", hex_fp);
= + "certific= ate hash verification failed. (got certificate "
+ "fingerprint: %s)&qu= ot;, hex_fp);
goto cleanup;
= }
}

To view= , visit c= hange 546. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ia73d53002f4ba2658af18c17cce= 1b68f79de5781
Gerrit-Change-Number: 546
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-CC: ordex <a@...2181...>
Gerrit-MessageType: merged
--+z3B/OMIJLM=--