From nobody Tue Nov 04 16:05:44 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d1Cwn0gGgz6GJZP; Tue, 04 Nov 2025 16:05:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d1Cwm6hxlz3X6X; Tue, 04 Nov 2025 16:05:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762272344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzJKxCvnervEXrCkL9RxAL3mAXHhA4AtI7lr7cpSqDQ=; b=BtyI+qpRZGEIFX5qzXH9NyLKmhRaHZTFZXNTjCCuVMuK8B+ocYIlliinhpBqBi0zWjKFQE YFBNsZKZgbtpDt2imbEFErqy+6hpOuRl6YctMfSE0dNPKVLMXbn3pFHxtCujeXtQymFcUx kHyXykHARQ5eHYbpJEpZufETmuOpC3PbO+7SElaCW1N/pMzBU27zJ7zlkUU7y+2vh0DOyV Yx22tzvhCl9TcYAXXl7ExkGDOHI09iSlKrq9vHqDVeRulJTFRff8zXMO3PDvurbYosCv8g DLeSCh4bWN2lbZ4HnYD5OqRdnLp9wSQYKYW8VkJo1qUfkaMKj3ykHo5ikiZvbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762272344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GzJKxCvnervEXrCkL9RxAL3mAXHhA4AtI7lr7cpSqDQ=; b=rOd8l3b/Ghx+jRdO8qH8AAjVsSsMcHcN8N2/AtMEuQ1NdXnqRhcD1INQlXiqIUrCUSYF2T 0kuYeUrDkQqcfbDcY53d1ktpsxsFveuydrCa81VKkTGniyGkrvJ8Fy+73xpPha4SGN76GE TGLvbL31+13Qt0nXribsRWUrKBiWtob6/DgL4diCqvj/pS6Mg8wIZZ+WmBHLwEWzZmRZ/k MnlQpL0iw5PLdxcqyeC0n/6DQx8GyI+iU68GR55caKw/4HFqATHUVtVS4ype+79FB3fjCS lukig/yBF05nlPLgsWiXmR8+kQmD4T+8t3nLSZBiuMIsL6exo7C50YZ7fY38vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762272344; a=rsa-sha256; cv=none; b=r9jswYpNocu4Nqgsh7c2FVSAdpZ248DSXBWzZzN6UXV6Azw1iA0OkCdr3PT3Ytn/BG1AYw qaIOGeU0VbAGW268mg+XwuXLlJpx6Umq+cc7p7/gvrKrmamYM6c+boIynQauyHfzkFL/5w mqNMl64loFj/eg8vmtWS+wmAO30wiMtg9o+0R087+1R3xOtBqZM/0hlpFpIXOi/GzaN2gM 1keIfHje4VP4ocwee60iEk1o7ShfHGYwQzyiLlYbAJCQY5Yeflr9oPjhZXfCewln7JRhjZ eIpFUaaGuy+sD0D6J3k8GJqfeDGk0vMQEsUzKzEUh3GlvOt3yDZI2atbcUWLnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d1Cwm6F3rz13nJ; Tue, 04 Nov 2025 16:05:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5A4G5i6m075663; Tue, 4 Nov 2025 16:05:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5A4G5iw9075660; Tue, 4 Nov 2025 16:05:44 GMT (envelope-from git) Date: Tue, 4 Nov 2025 16:05:44 GMT Message-Id: <202511041605.5A4G5iw9075660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 9b3c89ce8b2b - stable/15 - openssl: add a simple smoke test for the legacy provider List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9b3c89ce8b2b6455d50e364708988c832672a042 Auto-Submitted: auto-generated The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=9b3c89ce8b2b6455d50e364708988c832672a042 commit 9b3c89ce8b2b6455d50e364708988c832672a042 Author: Enji Cooper AuthorDate: 2025-10-11 20:45:20 +0000 Commit: Enji Cooper CommitDate: 2025-11-04 16:05:13 +0000 openssl: add a simple smoke test for the legacy provider This change adds a simple smoke test for the legacy provider to ensure that the provider doesn't break in the future when performing updates. This is not a functional or system test; the OpenSSL test suite does a much better job at doing this than we can. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53045 (cherry picked from commit 3b6442370a17c57c4c290b9a8e1e8328da820705) --- etc/mtree/BSD.tests.dist | 2 ++ secure/lib/libcrypto/Makefile | 3 +++ secure/lib/libcrypto/tests/Makefile | 5 ++++ secure/lib/libcrypto/tests/libcrypto_test.sh | 40 ++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 9ab2f3e972d6..520b41c8b88f 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -520,6 +520,8 @@ .. secure lib + libcrypto + .. .. libexec .. diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index 75ebb6e65327..6f9dd62d8610 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -673,6 +673,9 @@ buildasm cleanasm: ${.TARGET:S/build/all/:S/asm$//} .endfor +HAS_TESTS= yes +SUBDIR.${MK_TESTS}= tests + .include .if ${MACHINE} == "powerpc" diff --git a/secure/lib/libcrypto/tests/Makefile b/secure/lib/libcrypto/tests/Makefile new file mode 100644 index 000000000000..d309a1b1100c --- /dev/null +++ b/secure/lib/libcrypto/tests/Makefile @@ -0,0 +1,5 @@ +PACKAGE= tests + +ATF_TESTS_SH+= libcrypto_test + +.include diff --git a/secure/lib/libcrypto/tests/libcrypto_test.sh b/secure/lib/libcrypto/tests/libcrypto_test.sh new file mode 100755 index 000000000000..83ef1686089d --- /dev/null +++ b/secure/lib/libcrypto/tests/libcrypto_test.sh @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 Enji Cooper + +atf_test_case legacy_provider +legacy_provider_head() { + atf_set "descr" "daemon should drop privileges" +} +legacy_provider_body() { + local passphrase="test" + local plaintext="test" + + export OPENSSL_CONF="$PWD/openssl.conf" + cat > "$OPENSSL_CONF" <