aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2017-10-18 17:01:21 -0700
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2017-10-19 10:45:58 -0700
commit5b79ed2179c333949385ef959f01d4a7abbc351b (patch)
tree9695384e7bcfd5eeced20314ad5911edbffe0817
parent79d0c44afbc7da0adefe1250a17a49e6eb90c9bd (diff)
downloadsbsigntools-5b79ed2179c333949385ef959f01d4a7abbc351b.tar.gz
tests: fix signature resign/reattach test problems
The original tests to warn about overwriting signatures have never worked after the multiple signature code was added (because we add a new signature instead of overwriting the old one) update the tests to check instead for the signature addition. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rwxr-xr-xtests/reattach-warning.sh6
-rwxr-xr-xtests/resign-warning.sh6
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/reattach-warning.sh b/tests/reattach-warning.sh
index 51b8b0e..2b1f5ef 100755
--- a/tests/reattach-warning.sh
+++ b/tests/reattach-warning.sh
@@ -1,4 +1,8 @@
#!/bin/bash -e
+##
+# The original warning is gone because we now do multiple signatures
+# instead check that the second signature is added
+##
signed="test.signed"
sig="test.sig"
@@ -7,4 +11,4 @@ sig="test.sig"
cp "$image" "$signed"
"$sbattach" --attach "$sig" "$signed"
"$sbattach" --attach "$sig" "$signed" 2>&1 |
- grep '^warning: overwriting'
+ grep '^Image was already signed; adding additional signature'
diff --git a/tests/resign-warning.sh b/tests/resign-warning.sh
index 71026b1..544fbf3 100755
--- a/tests/resign-warning.sh
+++ b/tests/resign-warning.sh
@@ -1,7 +1,11 @@
#!/bin/bash -e
+##
+# The original warning is gone because we now do multiple signatures
+# instead check that the second signature is added
+##
signed="test.signed"
"$sbsign" --cert "$cert" --key "$key" --output "$signed" "$image"
"$sbsign" --cert "$cert" --key "$key" --output "$signed" "$signed" 2>&1 |
- grep '^warning: overwriting'
+ grep '^Image was already signed; adding additional signature'