[Openvpn-devel,v1] test_tls_crypt: Fix issue with temp file name on big endian systems
| Message ID | 20260702074746.3129-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
Delivered-To: patchwork@openvpn.net
Received: by 2002:a05:7000:1887:b0:869:83bc:8c48 with SMTP id r7csp321240max;
Thu, 2 Jul 2026 00:48:10 -0700 (PDT)
X-Forwarded-Encrypted: i=2;
AFNElJ+LW8rdP2MVALQ/cY6gYc5AiM4wE46xhyiRWX3W/LYXcgxaNcO3Jz2TUo74y2CMoxBIdQl/DNLFF4Y=@openvpn.net
X-Received: by 2002:a05:6820:290a:b0:6a1:4507:3535 with SMTP id
006d021491bc7-6a1922ceb93mr5374443eaf.38.1782978490064;
Thu, 02 Jul 2026 00:48:10 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1782978490; cv=none;
d=google.com; s=arc-20260327;
b=d9LuHFgplQ5QjTrpeCUGbu0uFRIOLgV97455qZnswQMDE2+ItLf8yamTFcaHLPKM1V
MO27F9WLXQCA7GQvDDypprrzxfoI7Ywr1nFF4H4xXo1fJuzqUDz4xBXsdFmh+deVrvM0
/4LDhh/lg2zjKYyG0xuqfwu9UFvLMXcoMBtFvM+BTVfcA1yqlYbd77tq1qMv0SZV+zoX
q4u46DjWjZsK1AFX3l01JdmpikYMf7YCazab7bL4yxwvvMici6wCVhOVAxN0RXzYd/l7
eoo5HLPY0QzDkGwBULk+CUmmzHZtaD0TAlEXfGT8GeFm/eHNuUxMtPB3Avls868wVrXe
I+/g==
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=87jK5UbThBhWkBvayjyarfr5M1L+a9O0Lyx/QDoiGcM=;
fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=;
b=QHfjrSVmARr5YhtT82Ujwvv+zzwy60T3OjUf7G4U0dGUsh/Gd5w2Wc4HI0LWxca8SQ
fTuOgjOw1SxzEeNPF8XjZLGWbDeQNLuzBJaec9lzvrOc1+ZPLJEtPRtByHpGYWkoe2/4
3V6kwpS275jLNiDBWlTvQVYUd6wcY8Sryzm9LIfZPjMz9ZYcH0bXH4nPGlGwcEonr1Xy
ZmsQA1oD6xk+UAFhmDnIvC4VUouZBKy0UFaF6Xe36Gg/55HYYrFYKLitzIdmSRxLA0Rr
NqPlI0JS2r5UZY3ck+/zex/8zXKAChdNQRfU3lhajKU68kh8JxDYo8bRVledeRT61v1V
9NIQ==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@lists.sourceforge.net header.s=beta
header.b=eAwf8MF2;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=K2WCmAhe;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b="lZ+R/S9J";
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
586e51a60fabf-44cbee14537si1886448fac.163.2026.07.02.00.48.09
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Thu, 02 Jul 2026 00:48:09 -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=eAwf8MF2;
dkim=neutral (body hash did not verify) header.i=@sourceforge.net
header.s=x header.b=K2WCmAhe;
dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x
header.b="lZ+R/S9J";
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=87jK5UbThBhWkBvayjyarfr5M1L+a9O0Lyx/QDoiGcM=; b=eAwf8MF2AQGU/eTQuXvi5c+0Xe
PIRzHM7q3zQSmzEv09Lven2oYp4hERwKdfJTJmWWjS5gTtkaLiSC/HUqt0BL38wZVGgTAvL66oZ5g
tlGpBKNtWWsNAXYBGMTSABBL97scLTPxBC3Vcr3SetMiz4cRRKGMMfRs2soIOUtkagWM=;
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.95)
(envelope-from <openvpn-devel-bounces@lists.sourceforge.net>)
id 1wfC9P-0000vu-3O;
Thu, 02 Jul 2026 07:47:59 +0000
Received: from [172.30.29.66] (helo=mx.sourceforge.net)
by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95)
(envelope-from <gert@blue4.greenie.muc.de>) id 1wfC9N-0000vo-8X
for openvpn-devel@lists.sourceforge.net;
Thu, 02 Jul 2026 07:47:58 +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=tpY8kAKcHzIAcKCE2vHMRJREm6lpcKfrLwOtKZI+cFE=; b=K2WCmAhe3C2zjpFaB1bHqPYOf7
Aq37zrSsHbyymxWEIT4S3NdWqr31nIFz2+xYmdD2j6nroDMdTLLs31MjtgSgy6UjVBQMpsu/kicbT
qpx83LIGKQG7EJwhEBGBg0s86zvknwGFpJJAy/zGtYE016QFq25YVrUzMQD9nAoIjY2c=;
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=tpY8kAKcHzIAcKCE2vHMRJREm6lpcKfrLwOtKZI+cFE=; b=lZ+R/S9JuaewnZ4ocehRvG6pBa
uChZ/uuFFFngJwRLCT15tBVeKuwPwGW7XJHUoHHw6ZF61v/DYfTVE+siMgM0BRyFHy9nu3e5UgQI9
ZKOZuiOKETH7zG0oOdJE9mjzKOIwq9zTozxR3oLLDrqb9mJh/xHzzbzt0YUSAWMxTuHQ=;
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 1wfC9J-00055c-Vd for openvpn-devel@lists.sourceforge.net;
Thu, 02 Jul 2026 07:47:57 +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 6627llZS003152
for <openvpn-devel@lists.sourceforge.net>; Thu, 2 Jul 2026 09:47:47 +0200
Received: (from gert@localhost)
by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6627llfI003151
for openvpn-devel@lists.sourceforge.net; Thu, 2 Jul 2026 09:47:47 +0200
From: Gert Doering <gert@greenie.muc.de>
To: openvpn-devel@lists.sourceforge.net
Date: Thu, 2 Jul 2026 09:47:40 +0200
Message-ID: <20260702074746.3129-1-gert@greenie.muc.de>
X-Mailer: git-send-email 2.53.0
In-Reply-To:
<gerrit.1782921496000.Iba577d662b389de539b81034735e437199cb495d@gerrit.openvpn.net>
References:
<gerrit.1782921496000.Iba577d662b389de539b81034735e437199cb495d@gerrit.openvpn.net>
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 <frank@lichtenheld.com> Encountered
by Fedora s390x build instances. Change-Id:
Iba577d662b389de539b81034735e437199cb495d
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Arne
Schwabe
<arne-openvpn@rfc2549.org> Gerrit URL: https://gerrit.openvpn.net/c [...]
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: 1wfC9J-00055c-Vd
Subject: [Openvpn-devel] [PATCH v1] test_tls_crypt: Fix issue with temp file
name on big endian systems
X-BeenThere: openvpn-devel@lists.sourceforge.net
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
X-GMAIL-THRID: 1869588452998430713
X-GMAIL-MSGID: 1869588452998430713
|
| Series |
[Openvpn-devel,v1] test_tls_crypt: Fix issue with temp file name on big endian systems
|
|
Commit Message
Gert Doering
July 2, 2026, 7:47 a.m. UTC
From: Frank Lichtenheld <frank@lichtenheld.com> Encountered by Fedora s390x build instances. Change-Id: Iba577d662b389de539b81034735e437199cb495d Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1761 --- 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/+/1761 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe <arne-openvpn@rfc2549.org>
Comments
Thanks. Confirm that it works on FreeBSD/64. Couldn't test on AIX,
as that test needs working ld --wrap and it wouldn't work "as is" for
me on that platform.
Your patch has been applied to the master and release/2.7 branch.
commit 7141f625c6114e08e40696464bfc36d5c5743683 (master)
commit c3d929cbfde012fbacae7d447e1755b07f64b464 (release/2.7)
Author: Frank Lichtenheld
Date: Thu Jul 2 09:47:40 2026 +0200
test_tls_crypt: Fix issue with temp file name on big endian systems
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1761
Message-Id: <20260702074746.3129-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg37454.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/tests/unit_tests/openvpn/test_tls_crypt.c b/tests/unit_tests/openvpn/test_tls_crypt.c index 82b1dc8..1d8ac25 100644 --- a/tests/unit_tests/openvpn/test_tls_crypt.c +++ b/tests/unit_tests/openvpn/test_tls_crypt.c @@ -722,8 +722,13 @@ tls_options.tmp_dir = "/tmp"; - /* Since we override rand_bytes the tmpfile name is non-random as well */ - const char *non_random_tmpfile = "/tmp/openvpn_tls_crypt_v2_metadata__706050403020100706050403020100.tmp"; + /* Since we override rand_bytes the tmpfile name is non-random as well. + * Build the expected name via the same code path as + * 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); expect_string(__wrap_buffer_write_file, filename, non_random_tmpfile);