From patchwork Thu Apr 8 02:00:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1723 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.27.255.58]) by backend30.mail.ord1d.rsapps.net with LMTP id oC5cFrfwbmCVcAAAIUCqbw (envelope-from ) for ; Thu, 08 Apr 2021 08:01:59 -0400 Received: from proxy5.mail.iad3a.rsapps.net ([172.27.255.58]) by director12.mail.ord1d.rsapps.net with LMTP id GD9WFrfwbmBnMgAAIasKDg (envelope-from ) for ; Thu, 08 Apr 2021 08:01:59 -0400 Received: from smtp4.gate.iad3a ([172.27.255.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy5.mail.iad3a.rsapps.net with LMTPS id eAmqELfwbmCWFAAAhn5joQ (envelope-from ) for ; Thu, 08 Apr 2021 08:01:59 -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: smtp4.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: 383e2964-9862-11eb-aa58-5254003c557e-1-1 Received: from [216.105.38.7] ([216.105.38.7:46936] helo=lists.sourceforge.net) by smtp4.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 14/36-03558-6B0FE606; Thu, 08 Apr 2021 08:01:59 -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 1lUTLI-0006IQ-RL; Thu, 08 Apr 2021 12:01:00 +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 1lUTLF-0006Hp-NM for openvpn-devel@lists.sourceforge.net; Thu, 08 Apr 2021 12:00:57 +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=E5tgiVr7vD2u3mdwYEDRMHNaJuYgE51yZO+RKIkEB2Y=; b=bzjYzZguu4HUaFPNJ4CXq9W2GQ PzEKAobCGwUWPRRDcDkzxuNM0mGGnMwFgUDLv71cur8L3t3gDtFPwlZgOQF5WanqGb+WlxouLbw/O YkxgdYqg9ihj2kVzdtrdlah5qfGjzKQBAWO2ypjlZ6cOfEWdvotxck9xhH8URxNW1eTc=; 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=E5tgiVr7vD2u3mdwYEDRMHNaJuYgE51yZO+RKIkEB2Y=; b=JyAr6CdagwiF1PZsGAUcSIjpnB 6D2QXQ9fGAaOtwQ0GyhnpevP7xpvxl4sRGR35HwkqyGj9RT7Ya6rtAN2+Ry9qYiTdih+s6e0GV1Mx N1cIgsdJoMt/OaIVymkCj57ZAn+oEvszAVYg4/ZW2QJXCPfIDTYE18RThFSRpH3HqgGQ=; 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 1lUTL2-004RX5-6O for openvpn-devel@lists.sourceforge.net; Thu, 08 Apr 2021 12:00:57 +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 1lUTKn-000D80-VW for openvpn-devel@lists.sourceforge.net; Thu, 08 Apr 2021 14:00:29 +0200 Received: (nullmailer pid 19491 invoked by uid 10006); Thu, 08 Apr 2021 12:00:29 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 8 Apr 2021 14:00:29 +0200 Message-Id: <20210408120029.19438-3-arne@rfc2549.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210408120029.19438-1-arne@rfc2549.org> References: <20210408120029.19438-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: 1lUTL2-004RX5-6O Subject: [Openvpn-devel] [PATCH 3/3] Allow all GCM ciphers 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 OpenSSL also allows ARIA-GCM and that works well with our implementation While the handpicked list was needed for earlier OpenSSL versions (and is still needed for Chacha20-Poly1305), the API nowadays with OpenSSL 1.0.2 and 1.1.x works as expected. Signed-off-by: Arne Schwabe --- src/openvpn/crypto_openssl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/openvpn/crypto_openssl.c b/src/openvpn/crypto_openssl.c index f8b36bf85..235d0c321 100644 --- a/src/openvpn/crypto_openssl.c +++ b/src/openvpn/crypto_openssl.c @@ -728,6 +728,11 @@ cipher_kt_mode_aead(const cipher_kt_t *cipher) { if (cipher) { + if (EVP_CIPHER_mode(cipher) == OPENVPN_MODE_GCM) + { + return true; + } + switch (EVP_CIPHER_nid(cipher)) { case NID_aes_128_gcm: