sbattach: fix --detach
sbattach --detach isn't working, as we're not properly setting sigbuf in image_pecoff parse. This change ensures we populate sigbuf when we find a valid cert table. Also, add a test case for this. Bug report & initial patch from from Steve Langasek. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
This commit is contained in:
parent
ca05adbc77
commit
36e79114d2
3 changed files with 31 additions and 4 deletions
|
@ -37,6 +37,7 @@ $(test_cert): $(test_key) Makefile
|
|||
|
||||
TESTS = sign-verify.sh \
|
||||
sign-verify-detached.sh \
|
||||
sign-detach-verify.sh \
|
||||
sign-attach-verify.sh \
|
||||
sign-missing-image.sh \
|
||||
sign-missing-cert.sh \
|
||||
|
|
10
tests/sign-detach-verify.sh
Executable file
10
tests/sign-detach-verify.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
. "$srcdir/common.sh"
|
||||
|
||||
signed="test.signed"
|
||||
sig="test.sig"
|
||||
|
||||
"$sbsign" --cert "$cert" --key "$key" --output "$signed" "$image"
|
||||
"$sbattach" --detach "$sig" "$signed"
|
||||
"$sbverify" --cert "$cert" --detached $sig "$image"
|
Loading…
Add table
Add a link
Reference in a new issue