From patchwork Mon Feb 17 03:43:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 1008 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id eL/CANymSl4APQAAIUCqbw for ; Mon, 17 Feb 2020 09:44:44 -0500 Received: from proxy3.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id +CKoANymSl6ffQAAvGGmqA ; Mon, 17 Feb 2020 09:44:44 -0500 Received: from smtp34.gate.ord1c ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy3.mail.ord1d.rsapps.net with LMTP id KLYmANymSl4/CgAA7WKfLA ; Mon, 17 Feb 2020 09:44:44 -0500 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: smtp34.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: 07feeb64-5194-11ea-a060-545200247500-1-1 Received: from [216.105.38.7] ([216.105.38.7:44712] helo=lists.sourceforge.net) by smtp34.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 68/A8-10052-AD6AA4E5; Mon, 17 Feb 2020 09:44:42 -0500 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 1j3hcq-0008Jm-4q; Mon, 17 Feb 2020 14:43:56 +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 1j3hco-0008JC-PV for openvpn-devel@lists.sourceforge.net; Mon, 17 Feb 2020 14:43:54 +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=02NvySHbGLx0DsiJe38dIf4CDQbb15I2FQomX5ZDmpQ=; b=Z+2T+ggpXdKe2UJuiT2DcXePt/ 7WP2b7yew+zjIyKEb55yQ+ZdxiXWuNgja0ha32942xM0bjZDHYurLLrapEdT+SBZDgKPhT/vbRrv7 VN5I4FN9J6rgSUGkssMU+nz07WBATlr8roZ4fPvdKo8TJd1gwnFcEa1ep0nYlyr73hjQ=; 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=02NvySHbGLx0DsiJe38dIf4CDQbb15I2FQomX5ZDmpQ=; b=EEsa0D8ARUzJjga3UGyJRHrXwN nrNo0ymVOX06t0F6ip37clnP3JoKijeXxhop5fynzWrBPckEcyw6J5+bTgcaEO8dyADxlOzD6nUxA 5Jabtt8u7maVDwcdLu+7AAVKMX37m5k+lelE9TxsQ+qjcepboo05er0bCC1TjquD/xw8=; 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 1j3hcj-006BZt-7S for openvpn-devel@lists.sourceforge.net; Mon, 17 Feb 2020 14:43:54 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1j3hca-0004fz-2I for openvpn-devel@lists.sourceforge.net; Mon, 17 Feb 2020 15:43:40 +0100 Received: (nullmailer pid 3318 invoked by uid 10006); Mon, 17 Feb 2020 14:43:39 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Mon, 17 Feb 2020 15:43:34 +0100 Message-Id: <20200217144339.3273-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.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 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1j3hcj-006BZt-7S Subject: [Openvpn-devel] [PATCH v4 0/5] NCP v2 patch set 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 Resend all patches to make applying them easier and sort them into the order they should be applied to keep Windows happy Arne Schwabe (5): Only announce IV_NCP=2 when we are willing to support these ciphers Add strsep compat function Implement dynamic NCP negotiation Move NCP related function into a seperate file and add unit tests Normalise ncp-ciphers option and restrict it to 127 bytes configure.ac | 2 +- doc/openvpn.8 | 13 +- src/compat/Makefile.am | 1 + src/compat/compat-strsep.c | 61 ++++++ src/compat/compat.h | 4 + src/compat/compat.vcxproj | 3 +- src/openvpn/Makefile.am | 1 + src/openvpn/init.c | 3 +- src/openvpn/multi.c | 1 + src/openvpn/openvpn.vcxproj | 2 + src/openvpn/openvpn.vcxproj.filters | 8 +- src/openvpn/options.c | 15 +- src/openvpn/push.c | 32 +++- src/openvpn/ssl.c | 85 +-------- src/openvpn/ssl.h | 31 --- src/openvpn/ssl_common.h | 2 +- src/openvpn/ssl_ncp.c | 274 +++++++++++++++++++++++++++ src/openvpn/ssl_ncp.h | 116 ++++++++++++ tests/unit_tests/openvpn/Makefile.am | 18 +- tests/unit_tests/openvpn/test_ncp.c | 207 ++++++++++++++++++++ 20 files changed, 752 insertions(+), 127 deletions(-) create mode 100644 src/compat/compat-strsep.c create mode 100644 src/openvpn/ssl_ncp.c create mode 100644 src/openvpn/ssl_ncp.h create mode 100644 tests/unit_tests/openvpn/test_ncp.c