summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2015-12-16 09:33:29 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2015-12-16 09:33:29 +0100
commit494dce9b223d39571ec031bb66d118807ae917d1 (patch)
tree5356d5710129bf9bbd070e59567e7c426f072a2f
parentbf145fdf7640be178b006579e3248dd230a9d0c9 (diff)
definition of trusted certificates directory
Change-Id: Iae2e845406764f3bbe2727bf191b54b8ea223e5b
-rw-r--r--src/Makefile.am3
-rw-r--r--src/wgtpkg-xmlsec.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index ac4814c..3259434 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -45,6 +45,7 @@ fwk_icondir = $(fwk_datadir)/icons
fwk_prefix = urn:agl:
fwk_prefix_permission = $(fwk_prefix)perm:
fwk_prefix_plugin = $(fwk_prefix)plugin:
+wgtpkg_trusted_cert_dir = $(fwk_confdir)/certs
AM_CFLAGS += -DFWK_CONFIG_DIR=\"$(fwk_confdir)\"
AM_CFLAGS += -DFWK_PREFIX_PERMISSION=\"$(fwk_prefix_permission)\"
@@ -52,6 +53,8 @@ AM_CFLAGS += -DFWK_PREFIX_PLUGIN=\"$(fwk_prefix_plugin)\"
AM_CFLAGS += -DFWK_ICON_DIR=\"$(fwk_icondir)\"
AM_CFLAGS += -DFWK_APP_DIR=\"$(fwk_appdir)\"
+AM_CFLAGS += -DWGTPKG_TRUSTED_CERT_DIR=\"$(wgtpkg_trusted_cert_dir)\"
+
AM_LDFLAGS = -Wl,--gc-sections
AM_CFLAGS += \
diff --git a/src/wgtpkg-xmlsec.c b/src/wgtpkg-xmlsec.c
index 31223ca..6b5f646 100644
--- a/src/wgtpkg-xmlsec.c
+++ b/src/wgtpkg-xmlsec.c
@@ -39,9 +39,7 @@ static int initstatus;
static int initdone;
static xmlSecKeysMngrPtr keymgr;
-#ifndef CA_ROOT_DIRECTORY
-#define CA_ROOT_DIRECTORY "./ca-certificates"
-#endif
+static const char trusted_certificates_directory[] = WGTPKG_TRUSTED_CERT_DIR;
/* checks if a file match uri (should not be a distributor signature) */
static int file_match_cb(const char *uri)
@@ -190,7 +188,7 @@ int xmlsec_init()
ERROR("xmlSecCryptoAppDefaultKeysMngrInit failed.");
goto end;
}
- fill_trusted_keys_dir(CA_ROOT_DIRECTORY);
+ fill_trusted_keys_dir(trusted_certificates_directory);
initstatus = 0;
end: