Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: tests/run_vbutil_tests.sh

Issue 4194003: Add support for using external signing application and .pem private key files to vbutil_keyblock. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: fix read() bug Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/external_rsa_signer.sh ('k') | utility/vbutil_keyblock.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tests/external_rsa_signer.sh ('k') | utility/vbutil_keyblock.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698