summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2015-11-10 15:39:04 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2015-11-10 15:39:04 +0100
commit1edc2a74a818a61b2958e7f9796222b13114971c (patch)
tree6e27b32252cddcfff241c7b5e6a7d81d20532303
parentad9428741b9a8f91e68829433bd643eee101a665 (diff)
Improves initialisation of xmlsec library
Testing XMLSEC_CRYPTO_DYNAMIC_LOADING to call (or not) xmlSecCryptoDLLoadLibrary is mandatory, not optional. Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--wgtpkg-xmlsec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wgtpkg-xmlsec.c b/wgtpkg-xmlsec.c
index 5c65217..b2c2e50 100644
--- a/wgtpkg-xmlsec.c
+++ b/wgtpkg-xmlsec.c
@@ -132,6 +132,13 @@ int xmlsec_init()
goto end;
}
+#ifdef XMLSEC_CRYPTO_DYNAMIC_LOADING
+ if(xmlSecCryptoDLLoadLibrary(XMLSEC_CRYPTO) < 0) {
+ syslog(LOG_ERR, "xmlSecCryptoDLLoadLibrary %s failed.", XMLSEC_CRYPTO);
+ goto end;
+ }
+#endif
+
if(xmlSecCryptoAppInit(NULL) < 0) {
syslog(LOG_ERR, "xmlSecCryptoAppInit failed.");
goto end;