From f9272d41e280f09746878caaf98a23420fe56170 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 16 Mar 2026 12:29:06 +0100 Subject: [PATCH] tests/NIT/nit.sh: when providing rootca.pem as CERTHASH(.0) file(s), fall back from symlink to hardlink to copy [#1711] Signed-off-by: Jim Klimov --- tests/NIT/nit.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/NIT/nit.sh b/tests/NIT/nit.sh index 82a7700543..0318c50466 100755 --- a/tests/NIT/nit.sh +++ b/tests/NIT/nit.sh @@ -920,8 +920,9 @@ case "${WITH_SSL_CLIENT}${WITH_SSL_SERVER}" in # OpenSSL CA trust "database" should include hashes # of CA PEM certificates as symlinks to actual files: CERTHASH="`openssl x509 -subject_hash -in rootca.pem | head -1`" - ln -s rootca.pem "${CERTHASH}".0 - ln -s rootca.pem "${CERTHASH}" + # NOTE: Symlinking may be prohibited or not implemented on some platforms (e.g. Windows) or file systems + ln -fs rootca.pem "${CERTHASH}".0 || ln -f rootca.pem "${CERTHASH}".0 || cp -f rootca.pem "${CERTHASH}".0 + ln -fs rootca.pem "${CERTHASH}" || ln -f rootca.pem "${CERTHASH}" || cp -f rootca.pem "${CERTHASH}" ls -l "${TESTCERT_PATH_ROOTCA}"/rootca.pem "${TESTCERT_PATH_ROOTCA}/${CERTHASH}"* ;; *)