From patchwork Wed Sep 26 02:01:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 469 X-Patchwork-Delegate: davids@openvpn.net Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id kE4kDHx1q1v8BgAAIUCqbw for ; Wed, 26 Sep 2018 08:03:08 -0400 Received: from proxy20.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id kPoxDHx1q1viXQAAvGGmqA ; Wed, 26 Sep 2018 08:03:08 -0400 Received: from smtp10.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy20.mail.ord1d.rsapps.net with LMTP id CBetC3x1q1uVTwAAsk8m8w ; Wed, 26 Sep 2018 08:03:08 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp10.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=rfc2549.org X-Suspicious-Flag: YES X-Classification-ID: 20feae84-c184-11e8-9c17-52540013bccb-1-1 Received: from [216.105.38.7] ([216.105.38.7:57501] helo=lists.sourceforge.net) by smtp10.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 8E/84-07027-B757BAB5; Wed, 26 Sep 2018 08:03:07 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1g58WW-0005Sk-Cu; Wed, 26 Sep 2018 12:02:32 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1g58WV-0005Se-33 for openvpn-devel@lists.sourceforge.NET; Wed, 26 Sep 2018 12:02:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To:Message-Id:Date:Subject:To: From:Sender:Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/uSFOKfVkHwe+7RixqrxB1f8E5bJwpG6KHa4+zFLXvw=; b=AZbTu2ksva0HteENXWj/i/fHaE IRU/PV3A3mfUpqqegvYu7QTNKJvPcQSz4ozkpxT0lxG9uq3lxaSfVkPUGICMAHRiklmB1MjZAV7qA w9h+tSXmRO8NB5XMc1t4/1fEumbHVdxWKgqWSq399LKKWXoqftULzhUQMPYogk0fRRJE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc :MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/uSFOKfVkHwe+7RixqrxB1f8E5bJwpG6KHa4+zFLXvw=; b=kXgsu4hRLyTnu0G/oTFUOujqV2 2bHDuxX+L7ckwaJB4Puv0Nqo3UxAaFEWZ6guICRRAXynlRCBi11276OUiZPeNCG0Ult2EVepmKaCh ETb2AajjSRPJYL/a3VFHqvJd18QtUdLON6I1ILOOsVxp07tbd2Mrrs0OZWhZXcfVJQrA=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1g58WA-006tAu-V6 for openvpn-devel@lists.sourceforge.NET; Wed, 26 Sep 2018 12:02:31 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.91 (FreeBSD)) (envelope-from ) id 1g58W0-000MJj-9X for openvpn-devel@lists.sourceforge.net; Wed, 26 Sep 2018 14:02:00 +0200 Received: (nullmailer pid 19918 invoked by uid 10006); Wed, 26 Sep 2018 12:01:59 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Wed, 26 Sep 2018 14:01:59 +0200 Message-Id: <20180926120159.19874-1-arne@rfc2549.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180925124819.4005-1-arne@rfc2549.org> References: <20180925124819.4005-1-arne@rfc2549.org> X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 TIME_LIMIT_EXCEEDED Exceeded time limit / deadline X-Headers-End: 1g58WA-006tAu-V6 Subject: [Openvpn-devel] [PATCH v2] Add message explaining early TLS client hello failure X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox In my tests an OpenSSL 1.1.1 server does not accept TLS 1.0 only clients anymore. Unfortunately, Debian 8 still has OpenVPN 2.3.4, which is TLS 1.0 only without setting tls-version-min. We currently log only OpenSSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol which indicates the right technical error but is not very helpful to a person without deep knowledge in SSL/TLS and OpenVPN's TLS version history. This commit adds a hopefully helpful message and also tells users how to fix the old Debian 8 clients. The error message will be displayed on the server side only. Note that connecting with an OpenSSL 1.1.1 client to a TLS 1.0 only server works fine. This behaviour is also not specific to OpenVPN. Using an openssl s_client with the -tls1 option against an openssl s_server exhibits the same behaviour. Patch V2: fixed message grammar, use tls-version-min 1.0 and clarify 2.3.6 and older to be actually between 2.3.2 and 2.3.6 Acked-by: Steffan Karger --- src/openvpn/crypto_openssl.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index 9ec2048d..43d75b89 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -199,7 +199,16 @@ crypto_print_openssl_errors(const unsigned int flags) "in common with the client. Your --tls-cipher setting might be " "too restrictive."); } - + else if (ERR_GET_REASON(err) == SSL_R_UNSUPPORTED_PROTOCOL) + { + msg(D_CRYPT_ERRORS, "TLS error: Unsupported protocol. This typically " + "indicates that client and server have no common TLS version enabled. " + "This can be caused by mismatched tls-version-min and tls-version-max " + "options on client and server. " + "If your OpenVPN client is between v2.3.6 and v2.3.2 try adding " + "tls-version-min 1.0 to the client configuration to use TLS 1.0+ " + "instead of TLS 1.0 only"); + } msg(flags, "OpenSSL: %s", ERR_error_string(err, NULL)); } }