mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-07-16 20:56:58 +00:00
initrdscripts: rename expected ima certificate (#28)
evmctl is able to import DER format certificate only. Although *.crt doesn't mean its a PEM certificate, but *.der makes more sense. Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
This commit is contained in:
@@ -100,7 +100,7 @@ keyring_id=0x`grep '\skeyring\s*\.ima: ' "${ROOT_DIR}/proc/keys" | awk '{ print
|
||||
# The trusted IMA certificate /etc/keys/x509_evm.der in initramfs was
|
||||
# automatically loaded by kernel already. Here is the opportunity to load
|
||||
# a custom IMA certificate from the real rootfs.
|
||||
for cert in ${ROOT_DIR}/etc/keys/x509_evm*.crt; do
|
||||
for cert in ${ROOT_DIR}/etc/keys/x509_evm*.der; do
|
||||
[ ! -s "$cert" ] && continue
|
||||
|
||||
if ! evmctl import "$cert" "$keyring_id" >"${ROOT_DIR}/dev/null"; then
|
||||
|
||||
Reference in New Issue
Block a user