From patchwork Mon Jun 7 08:26:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 1851 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id 0M0rHe5rvmA8ZwAAIUCqbw (envelope-from ) for ; Mon, 07 Jun 2021 14:56:46 -0400 Received: from proxy10.mail.ord1d.rsapps.net ([172.30.191.6]) by director9.mail.ord1d.rsapps.net with LMTP id UNgKHe5rvmAbbwAAalYnBA (envelope-from ) for ; Mon, 07 Jun 2021 14:56:46 -0400 Received: from smtp15.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy10.mail.ord1d.rsapps.net with LMTPS id eAahHO5rvmCzbgAAfSg8FQ (envelope-from ) for ; Mon, 07 Jun 2021 14:56:46 -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: smtp15.gate.ord1d.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; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: 1ab3ea66-c7c2-11eb-ab7b-5254007ab6c8-1-1 Received: from [216.105.38.7] ([216.105.38.7:50692] helo=lists.sourceforge.net) by smtp15.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 00/8D-11222-DEB6EB06; Mon, 07 Jun 2021 14:56:45 -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 1lqKPo-0006LI-Qb; Mon, 07 Jun 2021 18:56: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 1lqKPm-0006L1-U9 for openvpn-devel@lists.sourceforge.net; Mon, 07 Jun 2021 18:55:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: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=k7ZflBI+X76yJSxPZto7G+EzSq0lAn6QL4VdFehzAOU=; b=SNfER98Tjwg86Qp3NKCLUyy3KO pBRzP71Tl3PebGbL1RQPsojs+NqBcdsbuPDtQOnrTIv8k8hnhrwJPs2UZ0LtKokrj6qPjNzZqcYdG 4v08odJHMUxMXUmcqLexRALz9te6bEj257Y0FHI+GpH56St5zGiC9VuvqhLUqPbrfjLo=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To: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=k7ZflBI+X76yJSxPZto7G+EzSq0lAn6QL4VdFehzAOU=; b=X vorlgjYJmfDDp47+YwjK+NKEdKRosCCWcSfuiETD6kKyA/862WLfZAmc71GpCK/zCE9IL1y0Yj2Bk 4jXyHmOXD+YVTxEoSabrSLa7m3gGFTvZII2h9uoZMlouw1i5hI5Buesl+OmIQ5ilJmsUvpfsZG4HA cyf3PekH0ss91t0w=; Received: from mail-lj1-f177.google.com ([209.85.208.177]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.3) id 1lqKPf-00FsO7-Up for openvpn-devel@lists.sourceforge.net; Mon, 07 Jun 2021 18:56:00 +0000 Received: by mail-lj1-f177.google.com with SMTP id s22so3211659ljg.5 for ; Mon, 07 Jun 2021 11:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k7ZflBI+X76yJSxPZto7G+EzSq0lAn6QL4VdFehzAOU=; b=C5lghKtqzManni+obBzH65jFdo0wS2rsnctAge/gMshwu5ktdxyYDMUg2Ork8PbBu2 P4qCZj8NjBe4+Txip/oYshBnSjgbyfFhYnMmceid9nCtR5B4bqy1SHlqGLRrx8dI1K5Q t+nVmPYbQ9X9srHZ/6s2KxRYBoruMp1ajvtALdsFSPMGyB7lYQBTzTIOAbPgQKhbItmP fmyQGOkvN1BHbKmXwkigh7k0RAZU/PEWlz0TKgaWsWMFgJomFpYikijPq91MMrcl1RLI r5yy29WSRyGJYnSXc1nsazpsoLafOjkf+vqZFlaQWGgfDP99WLLLLD4qI6kOjppXhjN+ hzGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k7ZflBI+X76yJSxPZto7G+EzSq0lAn6QL4VdFehzAOU=; b=nu4rHmafxpKhMXDm2RzMFeJCi9WEg9vn4Njf5hmpWKE9BnoLeiKzqjYGFndRQY3rx6 qEkr+7/BKoQ+UsMxOWSv4qHi41q3uXXONm+kf97IPTry3q1sAkYjLcF93dIeR1uzsyFi 4u4fTpVCkO4SVLeUmECWVqzcUUZteEDR6q7BZBVD8C3ShgTK3/k6jkgAhECFLURQzoTJ 94+B9Il4sjCwZuETEL1BJQlMfWmhJxB4Gp8wd/Doe1cVy/C/ogIOKZPJUY7VkdYWJmAJ z5PTDXpYiEwwClTZtDw/qQCs6NVQn+vFl8ryATlAeZ0dr9MP886BAdwJAibmRnQ9ajdi YFHw== X-Gm-Message-State: AOAM531kUFeBoFZDlbFiyiroevRbj/ZWV5TC8B9mTGp+654NbFnvkLEM vmE6UX1N/UYP59Evlz09tMTLBcwVNZ6jAw== X-Google-Smtp-Source: ABdhPJzgJqGhhnduUYnth7Ar19ZCs8hyABgypKAbfj8XLDI+4Wct6aThzLDo66/xX2oit2MyN/3eKg== X-Received: by 2002:a2e:9a05:: with SMTP id o5mr4721966lji.249.1623092144828; Mon, 07 Jun 2021 11:55:44 -0700 (PDT) Received: from LAPTOP-4L3N7KFS.localdomain (81-175-157-115.bb.dnainternet.fi. [81.175.157.115]) by smtp.gmail.com with ESMTPSA id bu21sm853597lfb.180.2021.06.07.11.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 11:55:44 -0700 (PDT) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Mon, 7 Jun 2021 21:26:02 +0300 Message-Id: <20210607182602.273-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.177 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.177 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1lqKPf-00FsO7-Up Subject: [Openvpn-devel] [PATCH] options.c: fix msvc build error 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: , Cc: Lev Stipakov Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Lev Stipakov Commit b7fe49c ("Do not require CA when peer-fingerprint is used") broke msvc build by adding #ifdef within msg() macro call. options.c(2074,1): error C2121: '#': invalid character: possibly the result of a macro expansion options.c(2074,1): error C2146: syntax error: missing ')' before identifier 'ifndef' options.c(2074,1): error C2059: syntax error: ')' Fix by moving #ifdef outside of msg(). Reported-by: Samuli Seppänen Signed-off-by: Lev Stipakov Acked-by: selva.nair@gmail.com --- src/openvpn/options.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 6bbe5c15..606e6903 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2067,11 +2067,12 @@ check_ca_required(const struct options *options) return; } - msg(M_USAGE, "You must define CA file (--ca)" + const char* str = "You must define CA file (--ca)" #ifndef ENABLE_CRYPTO_MBEDTLS " or CA path (--capath)" #endif - " and/or peer fingeprint verification " "(--peer-fingerprint)"); + " and/or peer fingeprint verification " "(--peer-fingerprint)"; + msg(M_USAGE, str); } static void