diff mbox series

[meta-oe,v1] signing.bbclass: set all softhsm config keys explicitly

Message ID 20261104093201.3491037-1-johannes.schneider@leica-geosystems.com
State New
Headers show
Series [meta-oe,v1] signing.bbclass: set all softhsm config keys explicitly | expand

Commit Message

Johannes Schneider Nov. 4, 2026, 9:32 a.m. UTC
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>
---
Tested with a downstream copy of this class: a RAUC bundle build signs as
before, and the build host's journal no longer shows the warnings.

 meta-oe/classes/signing.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/meta-oe/classes/signing.bbclass b/meta-oe/classes/signing.bbclass
index b02825bd00..431ceab8e3 100644
--- a/meta-oe/classes/signing.bbclass
+++ b/meta-oe/classes/signing.bbclass
@@ -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