]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
crypto-util: prefer openssl-4
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Fri, 19 Jun 2026 19:38:44 +0000 (21:38 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 20 Jun 2026 00:39:48 +0000 (01:39 +0100)
Fedora has switched to openssl 4, and we generate a Requires dependency
on libcrypto for the systemd-udev subpackage, so preferring openssl-3
does the wrong thing. So the order in the dlopen note needs to be switched.
But in general, we want to get rid of openssl-3, so we want to load
openssl-4 in preference. Change the order in both places.

(The "compat" order can stay in 261-stable for other distros.)

src/shared/crypto-util.c
src/shared/crypto-util.h

index 9a3766d28ce0711e1fc4fc6b9df79b1321c4fe80..03ca4d6e80a35bf64417f2d731c2ee3353dd15ab 100644 (file)
@@ -339,8 +339,7 @@ int dlopen_libcrypto(int log_level) {
 
         LIBCRYPTO_NOTE(SD_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED);
 
-        // FIXME: switch order to prefer libcrypto.so.4 in a future version once it has stabilized
-        FOREACH_STRING(soname, "libcrypto.so.3", "libcrypto.so.4") {
+        FOREACH_STRING(soname, "libcrypto.so.4", "libcrypto.so.3") {
                 r = dlopen_many_sym_or_warn(
                         &libcrypto_dl,
                         soname,
index 980c1c60a2a5fcb86eaf891156a1fab2d26c44e1..bd0cb7b67b8ddc753ee1cb1fefbbfa1a09e5ec08 100644 (file)
@@ -37,7 +37,7 @@ int dlopen_libcrypto(int log_level);
         SD_ELF_NOTE_DLOPEN("libcrypto",                                 \
                            "Support for cryptographic operations",      \
                            priority,                                    \
-                           "libcrypto.so.3", "libcrypto.so.4")
+                           "libcrypto.so.4", "libcrypto.so.3")
 
 #define DLOPEN_LIBCRYPTO(log_level, priority)                           \
         ({                                                              \