From patchwork Tue Jul 14 12:12:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5108 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:5462:b0:878:73b6:dbac with SMTP id d2csp252357mas; Tue, 14 Jul 2026 05:12:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AFNElJ/0vRWpaDIhuv5lndSBrhNLLpk30ZefIUh02Km5zD6dd9xk+eH06qZQLOwSI0ZVwlqVyUpmsMwNbCI=@openvpn.net X-Received: by 2002:a05:6808:4483:b0:486:5466:e41f with SMTP id 5614622812f47-4a42b0422cfmr9068108b6e.38.1784031177830; Tue, 14 Jul 2026 05:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1784031177; cv=none; d=google.com; s=arc-20260327; b=D4742wM09/gLgGIlhZcvLkml232YiUiurqZYU52RJBCEWnIaCxAzspRtLyZW2Fm90v vgQaFvebxnQUoTSlmSELgqEu9QrBcOxBB/41BAuxRLWFH/mxXQD/i9buSWpIlJSKOK9m Zi+zOEbnmDs3qm+lLbVi+7hlN3m8pPaC57SFIGN9MnOmOPM5rbU0qpVyifS2Gq/cXBLx rnLtxwJb1YKLIiAmIbLvBnQ+/h/86/nSLv3D5ZjYrRsKCbdKzYuG5fOBepKrJxDDeAwB 88CI7PhsF18Exr7sCyDLQc9ffKChg/NME20bt4sDCcb+T6vTUoXYM04MiFYVrHOstCV5 36lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=nD8HruM/9aI9CaSFfF+ztH591O3FszEqlZjqvgrAhPs=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=EV8Ym16PhondCVd3nYqmCh+jpy5Ddag5hGMAfH1lloehwK8sdWrbBCHjww72O777Jw SgpKM0InzLve6JOa4HNvQZzaVqwRsEKSSxjwNSWPTnqWQlyJjm9ldI92VLF8P0DH6koX 4FAe+avGYTPb/uvo/490jC2K9aQzLH2P+JQDpKw2lywkw9jAcTOctqfLTCfvzbt8AD8e qTi3+azXIwci4Dcawnw6Dnr0fxCJXdzNo7ruLw4XZc42uxGNkWr4OIHYwURFmwF0CCEt FpNGSf8tqzWDd2wjXWFuEFvFmEyswjwIh5YTWE/vvM0WhxI+w01W3AU4fpFhExD+ndle IH3g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Gmq2tlrF; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=dSpKjasn; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=h3hsBbEW; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5614622812f47-4a42c0f8459si7830289b6e.9.2026.07.14.05.12.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jul 2026 05:12:57 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Gmq2tlrF; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=dSpKjasn; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=h3hsBbEW; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nD8HruM/9aI9CaSFfF+ztH591O3FszEqlZjqvgrAhPs=; b=Gmq2tlrF26lWM6Z5DhXQIv63nE F14ydZG/3sdM0f7xvrrD9flSkVLe5nLH9FGJVsv1NQQFAC1UYOslUjyxxOJjJBb7dMb6lNuaBqBmm 1RvtQc4nc4BjIzwzW1WbH4KV5pMI2kFfnRVxDp9w2cPOpVZz1kx9nkwt3Qzv6DrGxTrk=; 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.95) (envelope-from ) id 1wjc0M-0008Qc-02; Tue, 14 Jul 2026 12:12:54 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wjc0J-0008QV-SG for openvpn-devel@lists.sourceforge.net; Tue, 14 Jul 2026 12:12:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: 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=Smul2+WjnshbMrx9nZhhJxcFmRx29HYM9SNbXKJ87ec=; b=dSpKjasnsl0QWco5o/xXXBv0tq O2leSgeuSndLAN6WYLaQcK5FnznrkrBpZxbR7EaPSR062ire1sMdi8CdJudfFCke7ybx2+uplPuvD waDIbPytJqCwOMj0S5IXYzJRoPC4e9sOE8+uReaHWcFWPDpRcgbDzCzwSbQu75FVOXFk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: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=Smul2+WjnshbMrx9nZhhJxcFmRx29HYM9SNbXKJ87ec=; b=h3hsBbEWWrmu65iYJKqQ8biA4j iL84uGPyTsalXDh+5Yi2yHACNizd10m9kvIB1Nsw41nR2tzHJs7AnVEfGdhJXpQULyafV1U+/OLMH 65WaEagw4UPVWuUNoNqgKXWjMxeKTrZbKenvHEIZKRc53hPuSKmOJOekUG9cLRRCVwEM=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wjc0I-0007v3-GR for openvpn-devel@lists.sourceforge.net; Tue, 14 Jul 2026 12:12:51 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 66ECCc46013972 for ; Tue, 14 Jul 2026 14:12:38 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 66ECCcsL013971 for openvpn-devel@lists.sourceforge.net; Tue, 14 Jul 2026 14:12:38 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 14 Jul 2026 14:12:29 +0200 Message-ID: <20260714121238.13936-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Frank Lichtenheld - Exclude tests that use verify_script on Windows. We currently do not have openvpn_execve available for Windows tests. It would also need more work to replace the hardcoded paths. - Use platform_gen_ [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1wjc0I-0007v3-GR Subject: [Openvpn-devel] [PATCH v1] test_tls_crypt: Fix test failure on Windows 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1870692276748900005 X-GMAIL-MSGID: 1870692276748900005 From: Frank Lichtenheld - Exclude tests that use verify_script on Windows. We currently do not have openvpn_execve available for Windows tests. It would also need more work to replace the hardcoded paths. - Use platform_gen_path instead of hard-coding / Do to the previous change that is not strictly necessary, but it also doesn't hurt and it fixes at least one issue if anyone ever decides to port this to Windows). Change-Id: I45ddc8e350d3948b3197ae725df102d8ce73fa77 Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1781 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1781 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Lev Stipakov diff --git a/CMakeLists.txt b/CMakeLists.txt index 4779d69..b2da69b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -811,7 +811,6 @@ target_sources(test_mbuf PRIVATE tests/unit_tests/openvpn/mock_get_random.c - src/openvpn/buffer.c src/openvpn/mbuf.c ) diff --git a/tests/unit_tests/openvpn/test_tls_crypt.c b/tests/unit_tests/openvpn/test_tls_crypt.c index a2987c6..db03437 100644 --- a/tests/unit_tests/openvpn/test_tls_crypt.c +++ b/tests/unit_tests/openvpn/test_tls_crypt.c @@ -710,7 +710,7 @@ assert_true(tls_crypt_v2_extract_client_key(&tmp, &wrap_ctx, &tls_options)); tls_wrap_free(&wrap_ctx); - +#ifndef _WIN32 /* Use /bin/true as verify script */ script_security_set(2); tls_options.tls_crypt_v2_verify_script = "/usr/bin/true"; @@ -727,11 +727,12 @@ * platform_create_temp_file() */ char non_random_tmpfile[128]; snprintf(non_random_tmpfile, sizeof(non_random_tmpfile), - "%s/" PACKAGE "_tls_crypt_v2_metadata__%08" PRIx64 "%08" PRIx64 ".tmp", - tls_options.tmp_dir, get_random(), get_random()); - unlink(non_random_tmpfile); + PACKAGE "_tls_crypt_v2_metadata__%08" PRIx64 "%08" PRIx64 ".tmp", + get_random(), get_random()); + const char *tmpfile_path = platform_gen_path(tls_options.tmp_dir, non_random_tmpfile, &ctx->gc); + unlink(tmpfile_path); - expect_string(__wrap_buffer_write_file, filename, non_random_tmpfile); + expect_string(__wrap_buffer_write_file, filename, tmpfile_path); /* We do not write the first byte (type) to the file but rather to a * metadata_type environment variable */ @@ -752,7 +753,7 @@ tls_options.tls_crypt_v2_verify_script = "/bin/false"; } - expect_string(__wrap_buffer_write_file, filename, non_random_tmpfile); + expect_string(__wrap_buffer_write_file, filename, tmpfile_path); expect_memory(__wrap_buffer_write_file, pem, buf_bptr(&expected_metadata), buf_len(&expected_metadata)); will_return(__wrap_buffer_write_file, true); @@ -760,8 +761,8 @@ assert_false(tls_crypt_v2_extract_client_key(&tmp, &wrap_ctx, &tls_options)); tls_wrap_free(&wrap_ctx); - tls_options.tls_crypt_v2_verify_script = NULL; +#endif /* An outdated time should fail */ tmp = create_client_key_input(ctx, 31);