[RT-117x]Signing image with the HSM (SignServer)
1. PKI 体系


2. 签名要求
2.1 接口要求
Not found

2.2 签名验证

3. NXP签名格式测试用例
最后更新于




最后更新于
# !/bin/bash
rm -rf signed_imgsig.bin.cmdline
echo "[INFO] sign imgsig.bin.dup file."
openssl cms -sign -signer keys/IMG1_1_sha256_2048_65537_v3_usr_crt.pem \
-CAfile keys/ca_cert_chains.crt \
-inform der \
-inkey keys/IMG1_1_sha256_2048_65537_v3_usr_key.pem \
-md sha256 \
-outform DER \
-in imgsig.bin.dup \
-out signed_imgsig.bin.cmdline \
-passin pass:test \
-binary \
-nocerts \
-nosmimecap
if [ $? -ge 1 ]; then
echo "[ERR] sign failed!"
exit 2
fi
echo "[INFO] verify signed_imgsig.bin.cmdline file."
openssl cms -verify -certfile keys/IMG1_1_sha256_2048_65537_v3_usr_crt.pem \
-inform der \
-CAfile keys/ca_cert_chains.crt \
-in signed_imgsig.bin.cmdline \
-content imgsig.bin.dup \
-binary \
-nocerts \
-nosmimecap \
-nodetach > /dev/null
if [ $? -ge 1 ]; then
echo "[ERR] verify failed!"
exit 2
fi
echo "[INFO] done!"