From patchwork Fri Jul 10 23:36:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1236 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.27.255.9]) by backend30.mail.ord1d.rsapps.net with LMTP id qAzTNnqICV+iPQAAIUCqbw for ; Sat, 11 Jul 2020 05:38:02 -0400 Received: from proxy6.mail.iad3a.rsapps.net ([172.27.255.9]) by director9.mail.ord1d.rsapps.net with LMTP id sBoaNHqICV98YwAAalYnBA ; Sat, 11 Jul 2020 05:38:02 -0400 Received: from smtp11.gate.iad3a ([172.27.255.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy6.mail.iad3a.rsapps.net with LMTP id kDtqLnqICV+3FgAA8udqhg ; Sat, 11 Jul 2020 05:38:02 -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: smtp11.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: 36724d8c-c35a-11ea-a799-5254005eb44a-1-1 Received: from [216.105.38.7] ([216.105.38.7:48994] helo=lists.sourceforge.net) by smtp11.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id A0/9F-14390-A78890F5; Sat, 11 Jul 2020 05:38:02 -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.90_1) (envelope-from ) id 1juBwV-000473-CV; Sat, 11 Jul 2020 09:37:11 +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.90_1) (envelope-from ) id 1juBwT-00046c-Je for openvpn-devel@lists.sourceforge.net; Sat, 11 Jul 2020 09:37:09 +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=51KEHl6LxxhJuHALeQGyyDLg8JmTmn48RFnOIFHAe7E=; b=bPKGEsIh4zfAO/HhtFsN6CBfN1 eXpQ0pq38dbXfakQ/GmsybEFqSQXV7BRifqZ/IkKgw2smY58iiLHmkSqURFS67K8yCFR/xPciqtY7 usew4X/eFwZU7mf13Htydj4GHktU9GFWhAQHbSYFDuoRS0MHBVElpMmbfg1mpIOahWIc=; 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=51KEHl6LxxhJuHALeQGyyDLg8JmTmn48RFnOIFHAe7E=; b=FTP7F3HLtZgedsPVVzHwvvtR7P ELCU8Ttty6mwjq20pLpW0oJ/CzbrjmyD03HHbgUsKfuINVJDRvH7T5lbYdJMrFn2l9BN9bxTFHge1 QAt+Pm64639At7Co1xnNvqTyJD0rhup5OWGbMG5LiLm8uiBaReqfD4Eh9dYzdZQmvmc4=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1juBwR-00GxtP-HR for openvpn-devel@lists.sourceforge.net; Sat, 11 Jul 2020 09:37:09 +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 1juBwF-0002Q9-Lm for openvpn-devel@lists.sourceforge.net; Sat, 11 Jul 2020 11:36:55 +0200 Received: (nullmailer pid 23731 invoked by uid 10006); Sat, 11 Jul 2020 09:36:55 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Sat, 11 Jul 2020 11:36:42 +0200 Message-Id: <20200711093655.23686-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: 1juBwR-00GxtP-HR Subject: [Openvpn-devel] [PATCH v5 01/14] Allow changing fallback cipher from ccd files/client-connect 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 This allows to control the fallback cipher that is used when the client/server do have any common cipher on a per client basis. The patch is similar to Steffan's [PATCH v4] Allow changing cipher from a ccd file. Steffan's old patch also moves the cipher negotiation to multi_established_connection() which I independently discovered and implemented in Extract process_incoming_push_reply from process_incoming_push_msg (#FIXME add commitsh when commited to master) Signed-off-by: Arne Schwabe Acked-by: Gert Doering --- src/openvpn/options.c | 2 +- src/openvpn/options.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index b93fd4fe..bf2760e1 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -7892,7 +7892,7 @@ add_option(struct options *options, } else if (streq(p[0], "cipher") && p[1] && !p[2]) { - VERIFY_PERMISSION(OPT_P_NCP); + VERIFY_PERMISSION(OPT_P_NCP|OPT_P_INSTANCE); options->ciphername = p[1]; } else if (streq(p[0], "ncp-ciphers") && p[1] && !p[2]) diff --git a/src/openvpn/options.h b/src/openvpn/options.h index c83a46aa..c37006d3 100644 --- a/src/openvpn/options.h +++ b/src/openvpn/options.h @@ -677,7 +677,7 @@ struct options #define OPT_P_MTU (1<<14) /* TODO */ #define OPT_P_NICE (1<<15) #define OPT_P_PUSH (1<<16) -#define OPT_P_INSTANCE (1<<17) +#define OPT_P_INSTANCE (1<<17) /**< allowed in ccd, client-connect etc*/ #define OPT_P_CONFIG (1<<18) #define OPT_P_EXPLICIT_NOTIFY (1<<19) #define OPT_P_ECHO (1<<20)