From patchwork Fri Mar 19 03:20:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1632 X-Patchwork-Delegate: a@unstable.cc Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id APc+FUqzVGCLEQAAIUCqbw (envelope-from ) for ; Fri, 19 Mar 2021 10:20:58 -0400 Received: from proxy14.mail.ord1d.rsapps.net ([172.30.191.6]) by director8.mail.ord1d.rsapps.net with LMTP id yMf7FEqzVGB5eAAAfY0hYg (envelope-from ) for ; Fri, 19 Mar 2021 10:20:58 -0400 Received: from smtp27.gate.ord1c ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy14.mail.ord1d.rsapps.net with LMTPS id uJIaLEqzVGDsCgAAtEH5vw (envelope-from ) for ; Fri, 19 Mar 2021 10:20:58 -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.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: 526419e2-88be-11eb-b273-b8ca3a655ab8-1-1 Received: from [216.105.38.7] ([216.105.38.7:59424] helo=lists.sourceforge.net) by smtp27.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 37/37-18431-943B4506; Fri, 19 Mar 2021 10:20:57 -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 1lNFz4-00047o-LB; Fri, 19 Mar 2021 14:20:14 +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 1lNFz3-00047S-Bb for openvpn-devel@lists.sourceforge.net; Fri, 19 Mar 2021 14:20:13 +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=7pYeNLxf5itn1MTSKkhujt/6ZORqX8o1AdfeJyp80HE=; b=hryvq3/YxXiRMYdfqE2wlvH7Zc 2x2eof3lRzaFcDYrOaFaZmDKSQhEcgkJ7XFtRIg0m6R1VHLtE3sDDOJ6q5nsNcCho1Y8Y8KvL8z8p xJFx8wQFxsvRFvwVd/5cTbOOYxJ8HoVicCPwsm54aQnotn6rEW9LDN1w/qunLRHqzcss=; 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=7pYeNLxf5itn1MTSKkhujt/6ZORqX8o1AdfeJyp80HE=; b=aDmEFAjL4eijMv9S3s9p94P3rl ZMFaYFgCoIkcS1qdHwr3SKy3qmzAXZwDH8rfPBvntFy1tZIoKUz8PPwHUKii6wpGUsHFTcAOlrZav vgI4roezuySg9Sezvp3YJtpLwt0yCIm+FmOQqARz+gCSIz8v2IGw3rfE+DLCdoA4yQxM=; 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 1lNFyy-001tv2-Gl for openvpn-devel@lists.sourceforge.net; Fri, 19 Mar 2021 14:20:13 +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 1lNFys-000Mf1-7b for openvpn-devel@lists.sourceforge.net; Fri, 19 Mar 2021 15:20:02 +0100 Received: (nullmailer pid 2256 invoked by uid 10006); Fri, 19 Mar 2021 14:20:02 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Fri, 19 Mar 2021 15:20:01 +0100 Message-Id: <20210319142001.2201-4-arne@rfc2549.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210319142001.2201-1-arne@rfc2549.org> References: <20210319142001.2201-1-arne@rfc2549.org> 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: 1lNFyy-001tv2-Gl Subject: [Openvpn-devel] [PATCH v2 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. Signed-off-by: Arne Schwabe --- Changes.rst | 3 +++ doc/man-sections/tls-options.rst | 2 +- src/openvpn/options.c | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Changes.rst b/Changes.rst index f1674835..732387f2 100644 --- a/Changes.rst +++ b/Changes.rst @@ -26,6 +26,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 8f5e37cb..00ea063a 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 27ed813d..1ddcf7bf 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -8142,6 +8142,9 @@ add_option(struct options *options, int verify_hash_depth = 0; if (streq(p[0], "verify-hash")) { + "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; } @@ -8164,9 +8167,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 the " - "SHA256."); options->verify_hash_algo = SHA_DIGEST_LENGTH; digest_len = SHA_DIGEST_LENGTH; }