2012-06-13 06:23:26 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
2012-06-13 08:56:28 +00:00
|
|
|
sig="test.sig"
|
2012-06-13 06:23:26 +00:00
|
|
|
|
2020-06-06 01:34:55 +00:00
|
|
|
"$sbsign" --cert "$cert" --key "$key" --detached --output $sig "$image" || exit 1
|
|
|
|
"$sbverify" --cert "$cert" --detached $sig "$image" || exit 1
|
|
|
|
"$sbverify" --cert "$intcert" --detached $sig "$image" || exit 1
|
|
|
|
# should fail because no intermediate
|
|
|
|
"$sbverify" --cert "$cacert" --detached $sig "$image" && exit 1
|
|
|
|
|
|
|
|
# now make sure everything succeeds with the intermediate added
|
|
|
|
"$sbsign" --cert "$cert" --key "$key" --addcert "$intcert" --detached --output $sig "$image" || exit 1
|
|
|
|
"$sbverify" --cert "$cert" --detached $sig "$image" || exit 1
|
|
|
|
"$sbverify" --cert "$intcert" --detached $sig "$image" || exit 1
|
|
|
|
"$sbverify" --cert "$cacert" --detached $sig "$image" || exit 1
|
|
|
|
|
|
|
|
exit 0
|