From 353a003f1bd422ea71ed7009e2d7ed04476bc6e2 Mon Sep 17 00:00:00 2001 From: Lans Zhang Date: Mon, 3 Jul 2017 15:50:59 +0800 Subject: Use the DER-formatted system trusted key Signed-off-by: Lans Zhang --- meta-integrity/recipes-kernel/linux/linux-yocto-integrity.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'meta-integrity') diff --git a/meta-integrity/recipes-kernel/linux/linux-yocto-integrity.inc b/meta-integrity/recipes-kernel/linux/linux-yocto-integrity.inc index 247ae55..2e636cf 100644 --- a/meta-integrity/recipes-kernel/linux/linux-yocto-integrity.inc +++ b/meta-integrity/recipes-kernel/linux/linux-yocto-integrity.inc @@ -11,9 +11,10 @@ SRC_URI += "\ " do_configure_append() { - if [ -f "${STAGING_DIR_TARGET}${sysconfdir}/keys/system_trusted_key.pem" ]; then - openssl x509 -in "${STAGING_DIR_TARGET}${sysconfdir}/keys/system_trusted_key.pem" \ - -outform DER -out "${B}/system_trusted_cert.x509" + cert="${STAGING_DIR_TARGET}${sysconfdir}/keys/system_trusted_key.der" + + if [ -f "$cert" ]; then + install -m 0644 "$cert" "${B}/system_trusted_cert.x509" else true fi -- cgit v1.2.3-54-g00ecf