Add feature of autosigning widgets 37/24137/1
authorJosé Bollo <jose.bollo@iot.bzh>
Thu, 27 Feb 2020 16:12:55 +0000 (17:12 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Fri, 28 Feb 2020 11:39:07 +0000 (12:39 +0100)
commit956e7c57d15bde67d7392aab01a9c0fc6906bbd4
tree57ab4679060160c510fc45f92e20f0e5df8fdc9c
parentc5d922d7085c980edad3764687e2488a1b0907d0
Add feature of autosigning widgets

This adds the ability to automatically sign the
widgets that are packaged.

This is done by defining in the environment of
the packaging process the variables

  WGTPKG_AUTOSIGN_X=key-filepath[:cert-filepath]...

Where X is a number.

If such variable exist, signatures are generated
in the directory of the packaged or signed widget,
one for each variable, replacing any existing one.

Obviously, nothing is done if no such variable exist.

The generated signature file depends on X.

 - 0 is for file author-signature.xml
 - X is for file signature-X.xml

The program wgtpkg-pack automatically include that
behaviour by default. An option allows to remove it.

Bug-AGL: SPEC-2840

Change-Id: I00bc4a4d094f71b307e467f984f20d3d4cc3c7bd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/main-wgtpkg-pack.c
src/wgtpkg-digsig.c
src/wgtpkg-digsig.h