Use the DER-formatted system trusted key

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
This commit is contained in:
Lans Zhang
2017-07-03 15:50:59 +08:00
parent 3816bb03fd
commit 353a003f1b
3 changed files with 30 additions and 7 deletions
@@ -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