signing.bbclass: set all softhsm config keys explicitly

The generated softhsm2.conf only sets directories.tokendir and
objectstore.backend. SoftHSM warns about every other key it falls back to
the default for, and it logs through syslog(), so every process loading
the module during a build (rauc, extract-cert, ...) puts three
"Missing ... in configuration" lines into the build host's journal.

Set log.level, slots.removable and slots.mechanisms explicitly. The latter
two keep their defaults; log.level = ERROR keeps SoftHSM's INFO/WARNING
chatter out of the host journal while errors are still logged.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Johannes Schneider authored and Khem Raj committed 2026-11-04 09:38:05 -08:00
1 parent 805cef9814
commit 245f4c2e35
1 file changed
+6
+6
View File
@@ -112,6 +112,9 @@ signing_import_prepare() {
echo "directories.tokendir = $SOFTHSM2_DIR" > "$SOFTHSM2_CONF"
echo "objectstore.backend = db" >> "$SOFTHSM2_CONF"
echo "log.level = ERROR" >> "$SOFTHSM2_CONF"
echo "slots.removable = false" >> "$SOFTHSM2_CONF"
echo "slots.mechanisms = ALL" >> "$SOFTHSM2_CONF"
rm -rf "$SOFTHSM2_DIR"
mkdir -p "$SOFTHSM2_DIR"
@@ -353,6 +356,9 @@ signing_prepare() {
echo "directories.tokendir = $SOFTHSM2_DIR" > "$SOFTHSM2_CONF"
echo "objectstore.backend = db" >> "$SOFTHSM2_CONF"
echo "log.level = ERROR" >> "$SOFTHSM2_CONF"
echo "slots.removable = false" >> "$SOFTHSM2_CONF"
echo "slots.mechanisms = ALL" >> "$SOFTHSM2_CONF"
cat > "${OPENSSL_CONF}" <<EOF
openssl_conf = openssl_init