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:
Yunguo Wei
2017-11-12 09:43:48 +08:00
committed by Jia Zhang
parent 99f7472019
commit 1259958f3c
@@ -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