From patchwork Sun Mar 21 22:16:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1650 X-Patchwork-Delegate: a@unstable.cc Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.28.255.1]) by backend30.mail.ord1d.rsapps.net with LMTP id iI88OKFgWGAZBQAAIUCqbw (envelope-from ) for ; Mon, 22 Mar 2021 05:17:21 -0400 Received: from proxy1.mail.ord1c.rsapps.net ([172.28.255.1]) by director11.mail.ord1d.rsapps.net with LMTP id aLoTOKFgWGAHdgAAvGGmqA (envelope-from ) for ; Mon, 22 Mar 2021 05:17:21 -0400 Received: from smtp10.gate.ord1c ([172.28.255.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy1.mail.ord1c.rsapps.net with LMTPS id oMBCOaFgWGAuYwAA2VeTtA (envelope-from ) for ; Mon, 22 Mar 2021 05:17:21 -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.ord1c.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: 67e04556-8aef-11eb-a164-0026b954785f-1-1 Received: from [216.105.38.7] ([216.105.38.7:34554] helo=lists.sourceforge.net) by smtp10.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id D9/19-26939-1A068506; Mon, 22 Mar 2021 05:17:21 -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 1lOGfq-0007fD-Cd; Mon, 22 Mar 2021 09:16:34 +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 1lOGfo-0007f4-K7 for openvpn-devel@lists.sourceforge.net; Mon, 22 Mar 2021 09:16:32 +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=egD9XhjJendoqW2+IPfFE47RbBoY0gE38qhJLSd+6F0=; b=XQKtP+gTsJATOhZpHYBR4UwNQi EqOeEfUMuxFKxPnjppNCNu3wLXpfLYfnI7LItU5IS6UtCfOfde1DO3QmYOQNROXBZEw8oyfpNUild OB9z2lawPZHmL3lwXbgyzcRaWDMG8jR63IDONBpnvxHTKLEnsqnSzS0kOTzbfg6Vz7eQ=; 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=egD9XhjJendoqW2+IPfFE47RbBoY0gE38qhJLSd+6F0=; b=OXBfasUE0qav6yJiLE8lTTkFWA QRZ3G1nWhQeBNbjl8DIHRFwTwDQE/VzMiDoJ/9mD0uMEcIbl63ZblgDcNTr7ri/wk0Idqhx389mxB udo/HCTfc1v5s6NioVv8SWUA6eA1am38pBpkQdQThoYxrwwYd0sIYS1EsTtZWLjMv6m4=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1lOGfl-00DTBz-5x for openvpn-devel@lists.sourceforge.net; Mon, 22 Mar 2021 09:16:32 +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 1lOGfd-0005mh-Vb for openvpn-devel@lists.sourceforge.net; Mon, 22 Mar 2021 10:16:21 +0100 Received: (nullmailer pid 7908 invoked by uid 10006); Mon, 22 Mar 2021 09:16:21 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Mon, 22 Mar 2021 10:16:21 +0100 Message-Id: <20210322091621.7864-1-arne@rfc2549.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210319142001.2201-4-arne@rfc2549.org> References: <20210319142001.2201-4-arne@rfc2549.org> 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: 1lOGfl-00DTBz-5x Subject: [Openvpn-devel] [PATCH v3 5/5] Deprecate the --verify-hash option 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 Despite trying to figure out with multiple people what the use case for this option is, we could not come up with a good one. Checking that only a specific CA is used can be also done by only using that CA in the --ca directive. Although it feels a bit strange to deprecate the option after improving it with peer-fingerprint patches, all the improvements are needed for --peer-fingerprint and making them specify to --peer-fingerprint would have added more (unecessary) changes. Patch v3: rebased on v3 version of other patches. Signed-off-by: Arne Schwabe Acked-by: Antonio Quartulli --- Changes.rst | 3 +++ doc/man-sections/tls-options.rst | 2 +- src/openvpn/options.c | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Changes.rst b/Changes.rst index c0e0d5d9..01018b62 100644 --- a/Changes.rst +++ b/Changes.rst @@ -32,6 +32,9 @@ Deprecated features This was a very limited and not-well-tested way to run OpenVPN, on TCP and TAP mode only. +``verify-hash`` has been deprecated + This option has very limited usefulness and should be replaced by either + a better ``--ca`` configuration or with a ``--tls-verify`` script. Overview of changes in 2.5 ========================== diff --git a/doc/man-sections/tls-options.rst b/doc/man-sections/tls-options.rst index cfe1ec98..1b10f1e8 100644 --- a/doc/man-sections/tls-options.rst +++ b/doc/man-sections/tls-options.rst @@ -564,7 +564,7 @@ certificates and keys: https://github.com/OpenVPN/easy-rsa :code:`1.2`. --verify-hash args - Specify SHA1 or SHA256 fingerprint for level-1 cert. + **DEPRECATED** Specify SHA1 or SHA256 fingerprint for level-1 cert. Valid syntax: :: diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 4eee3a8a..1f6c05aa 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -8140,6 +8140,9 @@ add_option(struct options *options, int verify_hash_depth = 0; if (streq(p[0], "verify-hash")) { + msg(M_WARN, "DEPRECATED OPTION: The option --verify-hash is deprecated. " + "You should switch to the either use the level 1 certificate as " + "--ca option, use --tls-verify or use --peer-fingerprint"); /* verify level 1 cert, i.e. the CA that signed the leaf cert */ verify_hash_depth = 1; } @@ -8160,8 +8163,6 @@ add_option(struct options *options, if ((!p[2] && !is_inline) || (p[2] && streq(p[2], "SHA1"))) { options->verify_hash_algo = MD_SHA1; - msg(M_WARN, "DEPRECATED FEATURE: Usage of SHA1 fingerprints for " - "verify-hash is deprecated. You should switch to SHA256."); options->verify_hash_algo = SHA_DIGEST_LENGTH; digest_len = SHA_DIGEST_LENGTH; }