Index: tests/run_vbutil_tests.sh |
diff --git a/tests/run_vbutil_tests.sh b/tests/run_vbutil_tests.sh |
index b8811305717caaf0fb42400770f7880e1e62f8f7..b56f4c1259bcec35b9f66a150758c55dd03aa7ee 100755 |
--- a/tests/run_vbutil_tests.sh |
+++ b/tests/run_vbutil_tests.sh |
@@ -124,6 +124,46 @@ ${datahashalgo}${COL_STOP}" |
exit 1 |
fi |
+ echo -e "${COL_YELLOW}Testing keyblock creation using \ |
+external signer.${COL_STOP}" |
+ # Pack using external signer |
+ # Pack |
+ ${UTIL_DIR}/vbutil_keyblock --pack ${keyblockfile} \ |
+ --datapubkey \ |
+ ${TESTKEY_SCRATCH_DIR}/key_alg${data_algorithmcounter}.vbpubk \ |
+ --signprivate_pem \ |
+ ${TESTKEY_DIR}/key_rsa${signing_keylen}.pem \ |
+ --pem_algorithm "${signing_algorithmcounter}" \ |
+ --externalsigner "${SCRIPT_DIR}/external_rsa_signer.sh" |
+ |
+ if [ $? -ne 0 ] |
+ then |
+ echo -e "${COL_RED}Pack${COL_STOP}" |
+ return_code=255 |
+ fi |
+ |
+ # Unpack |
+ ${UTIL_DIR}/vbutil_keyblock --unpack ${keyblockfile} \ |
+ --datapubkey \ |
+ ${TESTKEY_SCRATCH_DIR}/key_alg${data_algorithmcounter}.vbpubk2 \ |
+ --signpubkey \ |
+ ${TESTKEY_SCRATCH_DIR}/key_alg${signing_algorithmcounter}.vbpubk |
+ if [ $? -ne 0 ] |
+ then |
+ echo -e "${COL_RED}Unpack${COL_STOP}" |
+ return_code=255 |
+ fi |
+ |
+ # Check |
+ if ! cmp -s \ |
+ ${TESTKEY_SCRATCH_DIR}/key_alg${data_algorithmcounter}.vbpubk \ |
+ ${TESTKEY_SCRATCH_DIR}/key_alg${data_algorithmcounter}.vbpubk2 |
+ then |
+ echo -e "${COL_RED}Check${COL_STOP}" |
+ return_code=255 |
+ exit 1 |
+ fi |
+ |
let data_algorithmcounter=data_algorithmcounter+1 |
done |
done |