diff options
author | George Liu <liuxiwei@inspur.com> | 2020-12-15 04:46:10 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2021-01-14 20:02:34 +0300 |
commit | f0afcf836269e7fba7c33c58146f2fcd3db57ae2 (patch) | |
tree | dbf348d44076ef018fe2bb08e0da8f6e596d00d8 /meta-phosphor/classes/image_types_phosphor.bbclass | |
parent | c17750fc725df234be31d799cd17efd47b198da6 (diff) | |
download | openbmc-f0afcf836269e7fba7c33c58146f2fcd3db57ae2.tar.xz |
image_type_phosphor: Support single signature for the tarball contents
Currently the contents of the code update tarball are individually
signed and signature files for each file are created.
In order to ensure that the contents of the tarball are the expected
ones as a full package, it is necessary to create an additional single
signature file bashed on the individual signature files.
(From meta-phosphor rev: 80b9baede615563bc15e5218cb051f57ae451b8d)
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I6373d4f0387e8f64c2c30be05e0d43af4ed9b913
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/classes/image_types_phosphor.bbclass')
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor.bbclass | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index e4663471c..fa5d3191c 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -332,6 +332,14 @@ make_signatures() { openssl dgst -sha256 -sign ${SIGNING_KEY} -out "${file}.sig" $file signature_files="${signature_files} ${file}.sig" done + + if [ -n "$signature_files" ]; then + sort_signature_files=`echo "$signature_files" | tr ' ' '\n' | sort | tr '\n' ' '` + cat $sort_signature_files > image-full + openssl dgst -sha256 -sign ${SIGNING_KEY} -out image-full.sig image-full + signature_files="${signature_files} image-full.sig" + rm -rf image-full + fi } do_generate_static_alltar() { |