From patchwork Mon Sep 7 06:18:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1416 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.27.255.8]) by backend30.mail.ord1d.rsapps.net with LMTP id GCJNAKldVl8tawAAIUCqbw (envelope-from ) for ; Mon, 07 Sep 2020 12:19:53 -0400 Received: from proxy10.mail.iad3a.rsapps.net ([172.27.255.8]) by director10.mail.ord1d.rsapps.net with LMTP id EM0OAKldVl8wDAAApN4f7A (envelope-from ) for ; Mon, 07 Sep 2020 12:19:53 -0400 Received: from smtp27.gate.iad3a ([172.27.255.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy10.mail.iad3a.rsapps.net with LMTPS id yM6iNKhdVl/6UgAAnQ/bqA (envelope-from ) for ; Mon, 07 Sep 2020 12:19:52 -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: smtp27.gate.iad3a.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: f501a0b0-f125-11ea-9228-525400358560-1-1 Received: from [216.105.38.7] ([216.105.38.7:45830] helo=lists.sourceforge.net) by smtp27.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id AE/F0-03314-8AD565F5; Mon, 07 Sep 2020 12:19:52 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kFJrC-0005EJ-Fo; Mon, 07 Sep 2020 16:19:02 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFJrB-0005Dp-0X for openvpn-devel@lists.sourceforge.net; Mon, 07 Sep 2020 16:19:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eJ+NuUYHm+wOn/SOYR5qyNBbkVfmhRxFD9iSw8c9jaw=; b=StAk8nrhtQabE9bzhVClrO8XYc Gc+26YWQPKJ/Sip0wWnB63uRRzSE34GtYGZIxXoHPWBReTXmJNv1vv8P0E4x5wnkSdRVRzzt2Jeo2 Aih2hXn2vrRjXhn96fvV6q09FulavuYpFy+JUJzWNqwiBOhomawm3HTyLJCcLhTJztII=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=eJ+NuUYHm+wOn/SOYR5qyNBbkVfmhRxFD9iSw8c9jaw=; b=KFGTvA3G0S6iNF66mZ9aUSxXqd SZfW/CKxrh76mc25TBKkHA8hOpyU6qlXD8i4MkLMRiBFC+bRanpvCCm7w5GdvjA/OrJ8/XtD+/pra iJkgr4cdxYKKPWsVPnwZYluW+dLbqx/d8toJvbCoSiNqzfeXPF3Np5Lk2DSY7R8P9zy8=; 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.92.2) id 1kFJr5-00FxTP-Tl for openvpn-devel@lists.sourceforge.net; Mon, 07 Sep 2020 16:19:00 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1kFJqz-000NaF-EL for openvpn-devel@lists.sourceforge.net; Mon, 07 Sep 2020 18:18:49 +0200 Received: (nullmailer pid 20553 invoked by uid 10006); Mon, 07 Sep 2020 16:18:49 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Mon, 7 Sep 2020 18:18:49 +0200 Message-Id: <20200907161849.20508-1-arne@rfc2549.org> X-Mailer: git-send-email 2.17.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1kFJr5-00FxTP-Tl Subject: [Openvpn-devel] [PATCH] Ignore --cipher for cipher negotiation in server client mode 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 OpenVPN will ignore --cipher in lieu of the replacement data-ciphers for cipher negioation. Signed-off-by: Arne Schwabe --- doc/man-sections/protocol-options.rst | 6 ++++-- src/openvpn/options.c | 26 ++++---------------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/doc/man-sections/protocol-options.rst b/doc/man-sections/protocol-options.rst index e9d5d63d..ca1407b9 100644 --- a/doc/man-sections/protocol-options.rst +++ b/doc/man-sections/protocol-options.rst @@ -57,8 +57,10 @@ configured in a compatible way between both the local and remote side. http://www.cs.ucsd.edu/users/mihir/papers/hmac.html --cipher alg - This option is deprecated for server-client mode. ``--data-ciphers`` - or possibly `--data-ciphers-fallback`` should be used instead. + This option is ignored for server-client mode cipher selection. + ``--data-ciphers`` or possibly ``--data-ciphers-fallback`` must be used + instead. It only determines which cipher is send in the + OCC string (see ``opt-verify``) for compatbility with old peers. Encrypt data channel packets with cipher algorithm ``alg``. diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 01da88ad..7dc3e3eb 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3074,12 +3074,6 @@ options_postprocess_cipher(struct options *o) "--data-ciphers-fallback config option"); } - msg(M_WARN, "--cipher is not set. Previous OpenVPN version defaulted to " - "BF-CBC as fallback when cipher negotiation failed in this case. " - "If you need this fallback please add '--data-ciphers-fallback " - "BF-CBC' to your configuration and/or add BF-CBC to " - "--data-ciphers."); - /* We still need to set the ciphername to BF-CBC since various other * parts of OpenVPN assert that the ciphername is set */ o->ciphername = "BF-CBC"; @@ -3087,22 +3081,10 @@ options_postprocess_cipher(struct options *o) else if (!o->enable_ncp_fallback && !tls_item_in_cipher_list(o->ciphername, o->ncp_ciphers)) { - msg(M_WARN, "DEPRECATED OPTION: --cipher set to '%s' but missing in" - " --data-ciphers (%s). Future OpenVPN version will " - "ignore --cipher for cipher negotiations. " - "Add '%s' to --data-ciphers or change --cipher '%s' to " - "--data-ciphers-fallback '%s' to silence this warning.", - o->ciphername, o->ncp_ciphers, o->ciphername, - o->ciphername, o->ciphername); - o->enable_ncp_fallback = true; - - /* Append the --cipher to ncp_ciphers to allow it in NCP */ - size_t newlen = strlen(o->ncp_ciphers) + 1 + strlen(o->ciphername) + 1; - char *ncp_ciphers = gc_malloc(newlen, false, &o->gc); - - ASSERT(openvpn_snprintf(ncp_ciphers, newlen, "%s:%s", o->ncp_ciphers, - o->ciphername)); - o->ncp_ciphers = ncp_ciphers; + msg(M_WARN, "Note: --cipher set to '%s' but missing in" + " --data-ciphers (%s). OpenVPN 2.6+ ignores --cipher for " + "cipher negiotiation.", + o->ciphername, o->ncp_ciphers); } }