From 7a4adb5268ae71260c86788ccdeb7a699c80ee0a Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Wed, 9 Oct 2013 10:14:35 -0700 Subject: Add support for ECDSA signatures This adds support for key version 5 which is an EC key using the NIST P-256 curve parameters. OTAs may be signed with these keys using the ECDSA signature algorithm with SHA-256. Change-Id: Id88672a3deb70681c78d5ea0d739e10f839e4567 --- verifier_test.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'verifier_test.sh') diff --git a/verifier_test.sh b/verifier_test.sh index 65f77f401..4761cef4a 100755 --- a/verifier_test.sh +++ b/verifier_test.sh @@ -81,20 +81,30 @@ expect_fail unsigned.zip expect_fail jarsigned.zip # success cases -expect_succeed otasigned.zip +expect_succeed otasigned.zip -e3 expect_succeed otasigned_f4.zip -f4 -expect_succeed otasigned_sha256.zip -sha256 -expect_succeed otasigned_f4_sha256.zip -sha256 -f4 +expect_succeed otasigned_sha256.zip -e3 -sha256 +expect_succeed otasigned_f4_sha256.zip -f4 -sha256 +expect_succeed otasigned_ecdsa_sha256.zip -ec -sha256 + +# success with multiple keys +expect_succeed otasigned.zip -f4 -e3 +expect_succeed otasigned_f4.zip -ec -f4 +expect_succeed otasigned_sha256.zip -ec -e3 -e3 -sha256 +expect_succeed otasigned_f4_sha256.zip -ec -sha256 -e3 -f4 -sha256 +expect_succeed otasigned_ecdsa_sha256.zip -f4 -sha256 -e3 -ec -sha256 # verified against different key expect_fail otasigned.zip -f4 -expect_fail otasigned_f4.zip +expect_fail otasigned_f4.zip -e3 +expect_fail otasigned_ecdsa_sha256.zip -e3 -sha256 # verified against right key but wrong hash algorithm -expect_fail otasigned.zip -sha256 -expect_fail otasigned_f4.zip -sha256 -f4 +expect_fail otasigned.zip -e3 -sha256 +expect_fail otasigned_f4.zip -f4 -sha256 expect_fail otasigned_sha256.zip expect_fail otasigned_f4_sha256.zip -f4 +expect_fail otasigned_ecdsa_sha256.zip # various other cases expect_fail random.zip -- cgit v1.2.3