diff options
author | Johannes Schneider <johannes.schneider@leica-geosystems.com> | 2025-08-20 12:11:28 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-08-20 07:35:07 -0700 |
commit | c092b3adc58b8b2fec3fbec93dce0fb62b60507c (patch) | |
tree | 97524d6dc6e63e4bc1a53f080d3e3b6b8f145c04 | |
parent | 5c33bc28eb99b00b92bd0287641a95fde5848f61 (diff) | |
download | meta-openembedded-c092b3adc58b8b2fec3fbec93dce0fb62b60507c.tar.gz |
signing.bbclass: create env with 0x600
The env file holds the PKCS#11 uris, which include the pin to access
the database - in plaintext. Directly create the file (after it has
been remove) with the proper 'user RW only' permissions, to give only
the build-user access to this somewhat "security sensitive" file.
Note that the softhsm/sqlite3.db* is already 0x600.
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/classes/signing.bbclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta-oe/classes/signing.bbclass b/meta-oe/classes/signing.bbclass index 26d1b592e3..b35184398a 100644 --- a/meta-oe/classes/signing.bbclass +++ b/meta-oe/classes/signing.bbclass | |||
@@ -104,6 +104,7 @@ signing_import_prepare() { | |||
104 | 104 | ||
105 | export _SIGNING_ENV_FILE_="${B}/meta-signing.env" | 105 | export _SIGNING_ENV_FILE_="${B}/meta-signing.env" |
106 | rm -f "$_SIGNING_ENV_FILE_" | 106 | rm -f "$_SIGNING_ENV_FILE_" |
107 | install -m 600 /dev/null "$_SIGNING_ENV_FILE_" | ||
107 | 108 | ||
108 | export SOFTHSM2_CONF="${B}/softhsm2.conf" | 109 | export SOFTHSM2_CONF="${B}/softhsm2.conf" |
109 | export SOFTHSM2_DIR="${B}/softhsm2.tokens" | 110 | export SOFTHSM2_DIR="${B}/softhsm2.tokens" |
@@ -331,7 +332,7 @@ signing_import_install() { | |||
331 | install -d ${D}${localstatedir}/lib/softhsm/tokens/${PN} | 332 | install -d ${D}${localstatedir}/lib/softhsm/tokens/${PN} |
332 | install -m 600 -t ${D}${localstatedir}/lib/softhsm/tokens/${PN} ${B}/softhsm2.tokens/*/* | 333 | install -m 600 -t ${D}${localstatedir}/lib/softhsm/tokens/${PN} ${B}/softhsm2.tokens/*/* |
333 | install -d ${D}${localstatedir}/lib/meta-signing.env.d | 334 | install -d ${D}${localstatedir}/lib/meta-signing.env.d |
334 | install -m 644 "${B}/meta-signing.env" ${D}${localstatedir}/lib/meta-signing.env.d/${PN} | 335 | install -m 600 "${B}/meta-signing.env" ${D}${localstatedir}/lib/meta-signing.env.d/${PN} |
335 | } | 336 | } |
336 | 337 | ||
337 | signing_prepare() { | 338 | signing_prepare() { |