diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-07-17 11:14:06 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2018-07-17 14:49:18 +0200 |
commit | d8d819bcde18c8b4b5dfbdf610a6fc5e04fa54bf (patch) | |
tree | 214ee1ec95aafe4855a25899886d2b33915fcb46 /CMakeLists.txt | |
parent | f97f8d24a1971117bbd4057ca0cd00776bcccb39 (diff) |
wgtpkg-digsig: Add flag to accept/refuse a WGT without signature
This flag allows with a single function to check the signature
and the case that a not signed widget is to be refused in the same
way that the signature is wrong.
The CMAKE boolean ALLOW_NO_SIGNATURE can be used to control
the default behavior at compile time. By default its value
is OFF meaning that install will refuse widgets without
signature.
Relates to Bug-AGL: SPEC-1590
Change-Id: I403109272759454696a1e5d9913879aaea7676e6
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 87373de..dc7f482 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,7 @@ set(PROJECT_URL "https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/app-fram set(USE_LIBZIP ON CACHE BOOL "should try to use libzip?") set(USE_SIMULATION OFF CACHE BOOL "if set simulates security manager and smack") set(USE_SDK OFF CACHE BOOL "if set, avoids installating system runtime files") +set(ALLOW_NO_SIGNATURE OFF CACHE BOOL "if set, widgets without signature are accepted") set(SIMULATE_SECMGR OFF CACHE BOOL "if set, the security manager is simulated") set(SIMULATE_SMACK OFF CACHE BOOL "if set, the smack environment is simulated") @@ -69,6 +70,12 @@ add_definitions( -DSYSTEMD_UNITS_ROOT="${systemd_units_root}" -DAFM_VERSION="${PROJECT_VERSION}" ) +if(ALLOW_NO_SIGNATURE) + add_definitions(-DDEFAULT_ALLOW_NO_SIGNATURE=1) +else(ALLOW_NO_SIGNATURE) + add_definitions(-DDEFAULT_ALLOW_NO_SIGNATURE=0) +endif(ALLOW_NO_SIGNATURE) + add_subdirectory(src) add_subdirectory(conf) |