Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167810452
D53045.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D53045.diff
View Options
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
--- 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
--- a/secure/lib/libcrypto/Makefile
+++ b/secure/lib/libcrypto/Makefile
@@ -682,6 +682,9 @@
${.TARGET:S/build/all/:S/asm$//}
.endfor
+HAS_TESTS= yes
+SUBDIR.${MK_TESTS}= tests
+
.include <bsd.lib.mk>
.if ${MACHINE} == "powerpc"
diff --git a/secure/lib/libcrypto/tests/Makefile b/secure/lib/libcrypto/tests/Makefile
new file mode 100644
--- /dev/null
+++ b/secure/lib/libcrypto/tests/Makefile
@@ -0,0 +1,5 @@
+PACKAGE= tests
+
+ATF_TESTS_SH+= libcrypto_test
+
+.include <bsd.test.mk>
diff --git a/secure/lib/libcrypto/tests/libcrypto_test.sh b/secure/lib/libcrypto/tests/libcrypto_test.sh
new file mode 100755
--- /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" <<EOF
+HOME = .
+
+openssl_conf = openssl_init
+
+[openssl_init]
+providers = provider_sect
+
+# List of providers to load
+[provider_sect]
+default = default_sect
+legacy = legacy_sect
+
+[default_sect]
+activate = 1
+
+[legacy_sect]
+activate = 1
+EOF
+
+ echo "$plaintext" | atf_check -s exit:0 -e empty -o not-empty \
+ openssl rc4 -e -k "$passphrase" -a -pbkdf2
+}
+
+atf_init_test_cases() {
+ atf_add_test_case legacy_provider
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 25, 5:36 PM (3 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37243823
Default Alt Text
D53045.diff (1 KB)
Attached To
Mode
D53045: openssl: add a simple smoke test for the legacy provider
Attached
Detach File
Event Timeline
Log In to Comment