From patchwork Wed Mar 24 12:51:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1658 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director15.mail.ord1d.rsapps.net ([172.27.255.8]) by backend30.mail.ord1d.rsapps.net with LMTP id aI1xNNbQW2DFUAAAIUCqbw (envelope-from ) for ; Wed, 24 Mar 2021 19:52:54 -0400 Received: from proxy19.mail.iad3a.rsapps.net ([172.27.255.8]) by director15.mail.ord1d.rsapps.net with LMTP id WOEeNNbQW2C6ZgAAIcMcQg (envelope-from ) for ; Wed, 24 Mar 2021 19:52:54 -0400 Received: from smtp33.gate.iad3a ([172.27.255.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy19.mail.iad3a.rsapps.net with LMTPS id qLC+LtbQW2A5LwAAXy6Yeg (envelope-from ) for ; Wed, 24 Mar 2021 19:52:54 -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: smtp33.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: 0cbe7030-8cfc-11eb-8d55-525400201c3f-1-1 Received: from [216.105.38.7] ([216.105.38.7:57882] helo=lists.sourceforge.net) by smtp33.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 36/58-19480-6D0DB506; Wed, 24 Mar 2021 19:52:54 -0400 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.92.3) (envelope-from ) id 1lPDIB-0003xQ-V8; Wed, 24 Mar 2021 23:52:03 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lPDIB-0003xK-4W for openvpn-devel@lists.sourceforge.net; Wed, 24 Mar 2021 23:52:03 +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=NQcXS/h6AlxIzIgrn23obgNRlt5SXwKC4X7eszMxd0s=; b=GtilQD360WHDDmvQN+eo7u1/QG kO/LANlGJHR8zonYNFkGv1eMtt3fCDzZ9qryTIf0zdaXOfc9XglwAh2gDN6yKeHqLAqdnlzpSf63U KBuLOXk9L4gkVj4qXZ6lnlhc4aBnlIlt2ZEw8bm3K9rJYvNxpmJhw18dvTohkexDZCBw=; 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=NQcXS/h6AlxIzIgrn23obgNRlt5SXwKC4X7eszMxd0s=; b=C2XA7leFuWvx9kZ1y0Sd6OlMIK eCEIZhC3W9P1ZOvqwHogb7qpXCFG/BNiiyZkMg2djzw5+jNLz9nXnvhcFXOte44ApPx+Q5qv++pvz wU3Er75TjRGEkHzTrc8pQiXtxXeUs/aq/AywutUQJniEb3+RibxrgwBR/1pF3JkqkcRE=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1lPDI6-0006Ut-Gu for openvpn-devel@lists.sourceforge.net; Wed, 24 Mar 2021 23:52:03 +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 1lPDHz-000F9o-AU for openvpn-devel@lists.sourceforge.net; Thu, 25 Mar 2021 00:51:51 +0100 Received: (nullmailer pid 9428 invoked by uid 10006); Wed, 24 Mar 2021 23:51:51 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 25 Mar 2021 00:51:50 +0100 Message-Id: <20210324235151.9384-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.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: rfc2549.org] 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: 1lPDI6-0006Ut-Gu Subject: [Openvpn-devel] [PATCH 1/2] Deprecate non TLS mode in OpenVPN 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 The non-TLS mode is a relict from OpenVPN 1.x or 2.0. When tls mode was introduce the advantages of TLS over non-tls were small but tls mode evolved to include a lot more features. (NCP, multipeer, AEAD ciphers to name a few). Today VPN that use --secret are mainly used because of its relative easy to setup and requiring to setup a PKI. This shortcoming of TLS mode should be addressed now with the peer-fingerprint option. Signed-off-by: Arne Schwabe --- doc/man-sections/protocol-options.rst | 2 +- src/openvpn/options.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/man-sections/protocol-options.rst b/doc/man-sections/protocol-options.rst index 01789e58..4b6928c6 100644 --- a/doc/man-sections/protocol-options.rst +++ b/doc/man-sections/protocol-options.rst @@ -235,7 +235,7 @@ configured in a compatible way between both the local and remote side. disables cipher negotiation. --secret args - Enable Static Key encryption mode (non-TLS). Use pre-shared secret + **DEPRECATED** Enable Static Key encryption mode (non-TLS). Use pre-shared secret ``file`` which was generated with ``--genkey``. Valid syntaxes: diff --git a/src/openvpn/options.c b/src/openvpn/options.c index e52679f0..5b559edf 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -514,7 +514,7 @@ static const char usage_message[] = "\n" "Data Channel Encryption Options (must be compatible between peers):\n" "(These options are meaningful for both Static Key & TLS-mode)\n" - "--secret f [d] : Enable Static Key encryption mode (non-TLS).\n" + "--secret f [d] : (DEPRECATED) Enable Static Key encryption mode (non-TLS).\n" " Use shared secret file f, generate with --genkey.\n" " The optional d parameter controls key directionality.\n" " If d is specified, use separate keys for each\n" @@ -2564,6 +2564,15 @@ options_postprocess_verify_ce(const struct options *options, msg(M_USAGE, "specify only one of --tls-server, --tls-client, or --secret"); } + if (!options->tls_server || !options->tls_client) + { + msg(M_INFO, "DEPRECATION: No tls-client or tls-server option in " + "configuration detected. OpenVPN 2.7 will remove the " + "functionality to run a VPN without TLS. " + "See the examples section in the manual page for " + "examples of a similar quick setup with peer-fingerprint."); + } + if (options->ssl_flags & (SSLF_CLIENT_CERT_NOT_REQUIRED|SSLF_CLIENT_CERT_OPTIONAL)) { msg(M_WARN, "WARNING: POTENTIALLY DANGEROUS OPTION " @@ -7868,6 +7877,7 @@ add_option(struct options *options, } else if (streq(p[0], "secret") && p[1] && !p[3]) { + msg(M_WARN, "DEPRECATED OPTION: The option --secret is deprecated. "); VERIFY_PERMISSION(OPT_P_GENERAL|OPT_P_INLINE); options->shared_secret_file = p[1]; options->shared_secret_file_inline = is_inline;