appliance: Create symlink /etc/crypto-policies/back-ends/opensslcnf.config

Downstream patched openssl in Fedora 37+ broke unless
/etc/crypto-policies/back-ends/opensslcnf.conf is present.  Files in
this directory are generated by %post rules that use scripting
languages so cannot easily be created by supermin.

Add a symlink to the DEFAULT policy file if the configuration file
doesn't exist.

A symptom of this problem is the error:

  Requested hash sha256 is not supported.
  Failed to set pbkdf parameters.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2133884
Updates: commit d6ba398825
This commit is contained in:
Richard W.M. Jones
2022-10-12 10:11:47 +01:00
parent f73c653cc0
commit 4004e8eb36

View File

@@ -76,6 +76,13 @@ if ! test -e /etc/mtab; then
ln -s /proc/mounts /etc/mtab
fi
# For openssl (RHBZ#2133884).
if test -d /etc/crypto-policies/back-ends &&
! test -f /etc/crypto-policies/back-ends/opensslcnf.config &&
test -f /usr/share/crypto-policies/DEFAULT/opensslcnf.txt ; then
ln -sf /usr/share/crypto-policies/DEFAULT/opensslcnf.txt /etc/crypto-policies/back-ends/opensslcnf.config
fi
# Static nodes must happen before udev is started.
# Set up kmod static-nodes (RHBZ#1011907).