diff options
| author | Iain Lane <iain.lane@canonical.com> | 2018-10-03 09:30:23 +0100 |
|---|---|---|
| committer | Iain Lane <iain.lane@canonical.com> | 2018-10-03 09:33:16 +0100 |
| commit | 898733d427e7b640bab0ea0fa578b3224102fde2 (patch) | |
| tree | 91c16e4d9d2c363858d1c9ea8a937e0f2c25373a /libnm-util | |
| parent | 9ba7891e6e49755ef4f3c9e3ef424a9ef06cf58c (diff) | |
| parent | eca0cfe89a2a7ec88abe9c03075160f46b338137 (diff) | |
Merge tag 'debian/1.12.4-1' into cosmic
network-manager Debian release 1.12.4-1
Diffstat (limited to 'libnm-util')
| -rw-r--r-- | libnm-util/meson.build | 32 | ||||
| -rw-r--r-- | libnm-util/tests/test-crypto.c | 4 |
2 files changed, 30 insertions, 6 deletions
diff --git a/libnm-util/meson.build b/libnm-util/meson.build index 55df5501..1e30fd9a 100644 --- a/libnm-util/meson.build +++ b/libnm-util/meson.build @@ -57,7 +57,6 @@ libnm_utils_enum = gnome.mkenums( sources = files( 'crypto.c', - 'crypto_' + crypto + '.c', 'nm-connection.c', 'nm-param-spec-specialized.c', 'nm-setting-8021x.c', @@ -93,7 +92,6 @@ sources = files( sources += shared_files_libnm_util deps = [ - crypto_dep, dbus_dep, dbus_glib_dep, shared_dep, @@ -109,6 +107,32 @@ cflags = common_cflags + [ '-DG_LOG_DOMAIN="@0@"'.format(libnm_util_name) ] +if crypto_gnutls_dep.found() + libnm_util_crypto_gnutls = static_library( + 'nm-util-crypto-gnutls', + sources: [ 'crypto_gnutls.c' ], + dependencies: deps + [ crypto_gnutls_dep ], + c_args: cflags + ) +endif + +if crypto_nss_dep.found() + libnm_util_crypto_nss = static_library( + 'nm-util-crypto-nss', + sources: [ 'crypto_nss.c' ], + dependencies: deps + [ crypto_nss_dep ], + c_args: cflags + ) +endif + +if crypto == 'gnutls' + libnm_util_crypto = libnm_util_crypto_gnutls +elif crypto == 'nss' + libnm_util_crypto = libnm_util_crypto_nss +else + error('bug') +endif + linker_script = join_paths(meson.current_source_dir(), 'libnm-util.ver') libnm_util = shared_library( @@ -121,6 +145,7 @@ libnm_util = shared_library( '-Wl,--version-script,@0@'.format(linker_script), ], link_depends: linker_script, + link_with: libnm_util_crypto, install: true ) @@ -175,11 +200,9 @@ run_target( sources = files( 'crypto.c', - 'crypto_' + crypto + '.c' ) deps = [ - crypto_dep, shared_dep ] @@ -187,6 +210,7 @@ libtest_crypto = static_library( 'test-crypto', sources: sources, dependencies: deps, + link_with: libnm_util_crypto, c_args: cflags ) diff --git a/libnm-util/tests/test-crypto.c b/libnm-util/tests/test-crypto.c index 61bd9774..af6028a5 100644 --- a/libnm-util/tests/test-crypto.c +++ b/libnm-util/tests/test-crypto.c @@ -383,8 +383,8 @@ main (int argc, char **argv) g_test_add_data_func ("/libnm/crypto/key/padding-8", "test2_key_and_cert.pem, 12345testing", test_key); - g_test_add_data_func ("/libnm/crypto/key/aes", - "test-aes-key.pem, test-aes-password", + g_test_add_data_func ("/libnm/crypto/key/aes-128", + "test-aes-128-key.pem, test-aes-password", test_key); g_test_add_data_func ("/libnm/crypto/PKCS#12/1", |