]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dcrypt: Use module_dir setting
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 25 Nov 2016 07:49:25 +0000 (09:49 +0200)
committerGitLab <gitlab@git.dovecot.net>
Mon, 28 Nov 2016 09:10:13 +0000 (11:10 +0200)
src/lib-dcrypt/Makefile.am
src/lib-dcrypt/test-crypto.c
src/lib-dcrypt/test-stream.c

index 21fd483ac9e7c4d8cec280bef3a7c64c823dca5f..f9c7c2af268ec0cbf12665208a46b00af9cf2e7d 100644 (file)
@@ -6,7 +6,8 @@ NOPLUGIN_LDFLAGS=
 AM_CPPFLAGS = \
        -I$(top_srcdir)/src/lib \
        -I$(top_srcdir)/src/lib-test \
-       -I$(top_srcdir)/src/lib-ssl-iostream
+       -I$(top_srcdir)/src/lib-ssl-iostream \
+       -DDCRYPT_MODULE_DIR=\"$(pkglibdir)\"
 
 libdcrypt_la_SOURCES = \
        dcrypt.c \
@@ -23,7 +24,6 @@ libdcrypt_openssl_la_LDFLAGS = -module -avoid-version -shared ../lib-ssl-iostrea
 libdcrypt_openssl_la_LIBADD = $(SSL_LIBS)
 libdcrypt_openssl_la_DEPENDENCIES = ../lib-ssl-iostream/libdovecot_openssl_common.la ../lib/liblib.la
 libdcrypt_openssl_la_CFLAGS = $(AM_CPPFLAGS) \
-       -DDCRYPT_MODULE_DIR=\"$(pkglibdir)\" \
        $(SSL_CFLAGS)
 endif
 
@@ -61,10 +61,10 @@ LIBDOVECOT_TEST = \
 
 test_crypto_LDADD = $(LIBDOVECOT_TEST)
 test_crypto_DEPENDENCIES = $(LIBDOVECOT_TEST_DEPS)
-test_crypto_CFLAGS = $(AM_CPPFLAGS) -DDCRYPT_MODULE_DIR=\".libs\" -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\"
+test_crypto_CFLAGS = $(AM_CPPFLAGS) -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\"
 test_crypto_SOURCES = $(libdcrypt_la_SOURCES) test-crypto.c
 
 test_stream_LDADD = $(LIBDOVECOT_TEST)
 test_stream_DEPENDENCIES = $(LIBDOVECOT_TEST_DEPS)
-test_stream_CFLAGS = $(AM_CPPFLAGS) -DDCRYPT_MODULE_DIR=\".libs\" -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\"
+test_stream_CFLAGS = $(AM_CPPFLAGS) -DDCRYPT_SRC_DIR=\"$(top_srcdir)/src/lib-dcrypt\"
 test_stream_SOURCES = $(libdcrypt_la_SOURCES) test-stream.c
index 0ef9cc421fcb5da24638559fd50465ed2e399b82..47a4cfe760bf14032a0454107cb9ad79ae269a9b 100644 (file)
@@ -752,8 +752,12 @@ void test_load_invalid_keys(void) {
 }
 
 int main(void) {
+       struct dcrypt_settings set = {
+               .module_dir = ".libs"
+       };
+
        random_init();
-       if (!dcrypt_initialize(NULL, NULL, NULL)) {
+       if (!dcrypt_initialize(NULL, &set, NULL)) {
                i_error("No functional dcrypt backend found - skipping tests");
                return 0;
        }
index f56d585da57fb1b3c233705573e99e5b21ed13c2..0ddd88cbd39577ec38d65f3244d88060915a25c5 100644 (file)
@@ -524,7 +524,11 @@ void test_free_keys() {
 }
 
 int main(void) {
-       if (!dcrypt_initialize(NULL, NULL, NULL)) {
+       struct dcrypt_settings set = {
+               .module_dir = ".libs"
+       };
+
+       if (!dcrypt_initialize(NULL, &set, NULL)) {
                i_error("No functional dcrypt backend found - skipping tests");
                return 0;
        }