2012-11-05 11:35:34 +01:00
|
|
|
if ENABLE_TESTS
|
|
|
|
|
|
2013-08-22 10:47:21 -04:00
|
|
|
AM_CPPFLAGS = \
|
2009-02-01 20:18:21 -05:00
|
|
|
-I$(top_srcdir)/include \
|
build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h"
For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus
paths of NetworkManager. It is desirable to have this header usable without
having a dependency on "glib.h", for example for a QT application. For that,
commit c0852964a890cf43cc2dcaeff41ac6edc5028f24 removed that dependancy.
For libnm-glib library, the analog to "nm-dbus-interface.h" is
"NetworkManager.h", and the same applies there. Commit
159e827a72f420048e12d318f8ba1edd3f641fc8 removed that include.
However, that broke build on PackageKit [1] which expected to get the
version macros by including "NetworkManager.h". So at least for libnm-glib,
we need to preserve old behavior so that a user including
"NetworkManager.h" gets the version macros, but not "glib.h".
Extract the version macros to a new header file "nm-version-macros.h".
This header doesn't include "glib.h" and can be included from
"NetworkManager.h". This gives as previous behavior and a glib-free
include.
For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h".
Very few users will actually need the version macros, but not using
libnm.
Users that use libnm, should just include (libnm's) "NetworkManager.h" to
get all headers.
As a special case, a user who doesn't want to use glib/libnm, but still
needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include
them both separately.
[1] https://github.com/hughsie/PackageKit/issues/85
Fixes: 4545a7fe9670ce4d7c259c11c2cc853bfae6729b
(cherry picked from commit 7bf10a75db84655e65fe6216d248f7775c58ca23)
2015-09-25 16:07:50 +02:00
|
|
|
-I$(top_builddir)/include \
|
2012-02-22 16:37:38 -05:00
|
|
|
-I$(top_srcdir)/libnm-util \
|
2013-08-22 10:47:21 -04:00
|
|
|
-I$(top_builddir)/libnm-util \
|
2014-02-12 12:28:52 -05:00
|
|
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
2013-08-22 10:47:21 -04:00
|
|
|
$(GLIB_CFLAGS) \
|
|
|
|
|
$(DBUS_CFLAGS) \
|
2014-07-25 17:50:14 -04:00
|
|
|
-DBUILD_DIR=\"$(abs_builddir)\" \
|
2014-10-30 11:07:03 -04:00
|
|
|
-DTEST_CERT_DIR=\"$(top_srcdir)/libnm-core/tests/certs/\"
|
2009-02-01 20:18:21 -05:00
|
|
|
|
2015-02-04 11:58:52 +01:00
|
|
|
@VALGRIND_RULES@
|
2014-08-06 20:19:07 -04:00
|
|
|
TESTS = \
|
2009-11-02 10:57:31 -08:00
|
|
|
test-settings-defaults \
|
|
|
|
|
test-crypto \
|
2011-03-09 09:31:44 -06:00
|
|
|
test-secrets \
|
2009-12-08 16:52:24 -08:00
|
|
|
test-general \
|
2013-09-13 09:44:56 -05:00
|
|
|
test-setting-8021x \
|
2014-08-06 20:19:07 -04:00
|
|
|
test-setting-dcb
|
|
|
|
|
|
|
|
|
|
noinst_PROGRAMS = \
|
|
|
|
|
$(TESTS) \
|
2014-07-25 17:50:14 -04:00
|
|
|
test-libnm-linking
|
2009-02-01 20:18:21 -05:00
|
|
|
|
|
|
|
|
test_settings_defaults_SOURCES = \
|
|
|
|
|
test-settings-defaults.c
|
|
|
|
|
|
|
|
|
|
test_settings_defaults_LDADD = \
|
2009-08-20 12:31:17 -05:00
|
|
|
$(top_builddir)/libnm-util/libnm-util.la \
|
2009-02-15 11:20:25 -05:00
|
|
|
$(GLIB_LIBS) \
|
2009-08-20 12:31:17 -05:00
|
|
|
$(DBUS_LIBS)
|
2009-02-01 20:18:21 -05:00
|
|
|
|
2009-02-02 01:03:15 -05:00
|
|
|
test_crypto_SOURCES = \
|
|
|
|
|
test-crypto.c
|
|
|
|
|
|
|
|
|
|
test_crypto_LDADD = \
|
2009-08-20 12:31:17 -05:00
|
|
|
$(top_builddir)/libnm-util/libtest-crypto.la \
|
libnm-util: add nm_utils_rsa_key_encrypt() and fix crypto padding mixups
To be backwards compatible clients need to handle both paths to private
keys and the decrypted private key data, which is what used to get passed
in the private-key and phase2-private-key attributes of the 802.1x setting.
When moving a connection around between system-settings and user-settings,
if the private key is decrypted data, the settings service needs to store
that decrypted data somewhere so that the key can be sent to NM during
the connection process.
But we don't want to store the decrypted private key data, so we have to
re-encrypt it (possibly generating a private key password if one wasn't
sent with the decrypted data) and save it to disk, then send NM a path
to that private key during connection.
To help clients do this, and so that they don't have to carry around
multiple crypto implementations depending on whether they want to use
NSS or gnutls/gcrypt, add a helper to libnm-util.
Furthermore, I misunderstood a bunch of stuff with crypto padding when
writing the encrypt/decrypt functions long ago, so fix that up. Don't
return padding as part of the decrypted data, and make sure to verify
the padding's expected lengths and values when decrypting. Many thanks
to Nalin Dahyabhai for pointing me in the right direction.
2009-09-15 16:01:50 -07:00
|
|
|
$(top_builddir)/libnm-util/libnm-util.la \
|
2009-08-20 12:31:17 -05:00
|
|
|
$(GLIB_LIBS)
|
2009-02-02 01:03:15 -05:00
|
|
|
|
2011-03-09 09:31:44 -06:00
|
|
|
test_secrets_SOURCES = \
|
|
|
|
|
test-secrets.c
|
2009-10-18 23:36:47 -07:00
|
|
|
|
2011-03-09 09:31:44 -06:00
|
|
|
test_secrets_LDADD = \
|
2009-10-18 23:36:47 -07:00
|
|
|
$(top_builddir)/libnm-util/libnm-util.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_LIBS)
|
2009-02-02 01:03:15 -05:00
|
|
|
|
2009-11-02 10:57:31 -08:00
|
|
|
test_general_SOURCES = \
|
|
|
|
|
test-general.c
|
|
|
|
|
|
|
|
|
|
test_general_LDADD = \
|
|
|
|
|
$(top_builddir)/libnm-util/libnm-util.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_LIBS)
|
|
|
|
|
|
2014-07-25 17:50:14 -04:00
|
|
|
test_general_DEPENDENCIES = test-libnm-linking
|
|
|
|
|
|
2009-12-08 16:52:24 -08:00
|
|
|
test_setting_8021x_SOURCES = \
|
|
|
|
|
test-setting-8021x.c
|
|
|
|
|
|
|
|
|
|
test_setting_8021x_LDADD = \
|
|
|
|
|
$(top_builddir)/libnm-util/libnm-util.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_LIBS)
|
|
|
|
|
|
2013-09-13 09:44:56 -05:00
|
|
|
test_setting_dcb_SOURCES = \
|
|
|
|
|
test-setting-dcb.c
|
|
|
|
|
|
|
|
|
|
test_setting_dcb_LDADD = \
|
|
|
|
|
$(top_builddir)/libnm-util/libnm-util.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_LIBS)
|
|
|
|
|
|
2014-07-25 17:50:14 -04:00
|
|
|
test_libnm_linking_SOURCES = \
|
|
|
|
|
test-libnm-linking.c
|
|
|
|
|
|
|
|
|
|
test_libnm_linking_LDADD = \
|
|
|
|
|
$(top_builddir)/libnm/libnm.la \
|
|
|
|
|
$(top_builddir)/libnm-util/libnm-util.la \
|
|
|
|
|
$(GLIB_LIBS) \
|
|
|
|
|
$(DBUS_LIBS)
|
|
|
|
|
|
2009-02-01 20:18:21 -05:00
|
|
|
endif
|