summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-08-29 18:58:14 +0200
committerThomas Haller <thaller@redhat.com>2018-09-03 18:07:59 +0200
commite62c15d9b1d5c26342667ff83d03d9f11a4db2d1 (patch)
tree7fc84ed2d073c1d7c2cba4aada875c55dd9d3d22
parentbd9d2ad27a40e272b92d9d7734aaf3b4ad289e69 (diff)
downloadNetworkManager-e62c15d9b1d5c26342667ff83d03d9f11a4db2d1.tar.gz
libnm/crypto: rename libnm's crypto files
"crypto.h" did not follow our common NM style naming. Rename the files.
-rw-r--r--Makefile.am12
-rw-r--r--docs/libnm/Makefile.am2
-rw-r--r--docs/libnm/meson.build2
-rw-r--r--libnm-core/meson.build4
-rw-r--r--libnm-core/nm-crypto-gnutls.c (renamed from libnm-core/crypto_gnutls.c)3
-rw-r--r--libnm-core/nm-crypto-nss.c (renamed from libnm-core/crypto_nss.c)3
-rw-r--r--libnm-core/nm-crypto.c (renamed from libnm-core/crypto.c)2
-rw-r--r--libnm-core/nm-crypto.h (renamed from libnm-core/crypto.h)6
-rw-r--r--libnm-core/nm-setting-8021x.c2
-rw-r--r--libnm-core/nm-utils.c2
-rw-r--r--libnm-core/tests/test-crypto.c2
-rw-r--r--po/POTFILES.in6
12 files changed, 24 insertions, 22 deletions
diff --git a/Makefile.am b/Makefile.am
index 1183d311b5..8fa1c19738 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -508,7 +508,7 @@ libnm_core_lib_h_priv = \
shared/nm-utils/nm-udev-utils.h \
shared/nm-ethtool-utils.h \
shared/nm-meta-setting.h \
- libnm-core/crypto.h \
+ libnm-core/nm-crypto.h \
libnm-core/nm-connection-private.h \
libnm-core/nm-core-internal.h \
libnm-core/nm-core-types-internal.h \
@@ -576,7 +576,7 @@ libnm_core_lib_c_real = \
shared/nm-utils/nm-udev-utils.c \
shared/nm-ethtool-utils.c \
shared/nm-meta-setting.c \
- libnm-core/crypto.c \
+ libnm-core/nm-crypto.c \
libnm-core/nm-connection.c \
libnm-core/nm-dbus-utils.c \
libnm-core/nm-errors.c \
@@ -683,18 +683,18 @@ libnm_core_libnm_core_la_LDFLAGS = \
$(SANITIZER_LIB_LDFLAGS)
if WITH_GNUTLS
-libnm_core_lib_c_real += libnm-core/crypto_gnutls.c
+libnm_core_lib_c_real += libnm-core/nm-crypto-gnutls.c
libnm_core_libnm_core_la_LIBADD += $(GNUTLS_LIBS)
endif
if WITH_NSS
-libnm_core_lib_c_real += libnm-core/crypto_nss.c
+libnm_core_lib_c_real += libnm-core/nm-crypto-nss.c
libnm_core_libnm_core_la_LIBADD += $(NSS_LIBS)
endif
EXTRA_DIST += \
- libnm-core/crypto_gnutls.c \
- libnm-core/crypto_nss.c \
+ libnm-core/nm-crypto-gnutls.c \
+ libnm-core/nm-crypto-nss.c \
libnm-core/nm-core-enum-types.c.template \
libnm-core/nm-core-enum-types.h.template \
libnm-core/meson.build
diff --git a/docs/libnm/Makefile.am b/docs/libnm/Makefile.am
index c2bcff1be5..7c3b54b484 100644
--- a/docs/libnm/Makefile.am
+++ b/docs/libnm/Makefile.am
@@ -32,7 +32,7 @@ CFILE_GLOB=$(top_srcdir)/libnm-core/*.c $(top_srcdir)/libnm/*.c
# Header files to ignore when scanning.
IGNORE_HFILES= \
common.h \
- crypto.h \
+ nm-crypto.h \
nm-dbus-helpers.h \
nm-core-internal.h \
nm-core-types-internal.h \
diff --git a/docs/libnm/meson.build b/docs/libnm/meson.build
index 7baf09f823..35aae523be 100644
--- a/docs/libnm/meson.build
+++ b/docs/libnm/meson.build
@@ -2,7 +2,7 @@ doc_module = libnm_name
private_headers = [
'common.h',
- 'crypto.h',
+ 'nm-crypto.h',
'nm-dbus-helpers.h',
'nm-core-internal.h',
'nm-core-types-internal.h',
diff --git a/libnm-core/meson.build b/libnm-core/meson.build
index ab570b6b47..5596ab5716 100644
--- a/libnm-core/meson.build
+++ b/libnm-core/meson.build
@@ -107,8 +107,8 @@ libnm_core_settings_sources = files(
)
libnm_core_sources = libnm_core_settings_sources + files(
- 'crypto.c',
- 'crypto_' + crypto + '.c',
+ 'nm-crypto.c',
+ 'nm-crypto-' + crypto + '.c',
'nm-connection.c',
'nm-dbus-utils.c',
'nm-errors.c',
diff --git a/libnm-core/crypto_gnutls.c b/libnm-core/nm-crypto-gnutls.c
index 49181ee722..2cdb259af3 100644
--- a/libnm-core/crypto_gnutls.c
+++ b/libnm-core/nm-crypto-gnutls.c
@@ -23,12 +23,13 @@
#include "nm-default.h"
+#include "nm-crypto.h"
+
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>
#include <gnutls/x509.h>
#include <gnutls/pkcs12.h>
-#include "crypto.h"
#include "nm-errors.h"
#define SALT_LEN 8
diff --git a/libnm-core/crypto_nss.c b/libnm-core/nm-crypto-nss.c
index 3b457fbb30..eec61e0f87 100644
--- a/libnm-core/crypto_nss.c
+++ b/libnm-core/nm-crypto-nss.c
@@ -23,6 +23,8 @@
#include "nm-default.h"
+#include "nm-crypto.h"
+
#include <prinit.h>
#include <nss.h>
#include <pk11pub.h>
@@ -33,7 +35,6 @@
#include <ciferfam.h>
#include <p12plcy.h>
-#include "crypto.h"
#include "nm-errors.h"
static gboolean initialized = FALSE;
diff --git a/libnm-core/crypto.c b/libnm-core/nm-crypto.c
index 88f8dde61e..72e66a133c 100644
--- a/libnm-core/crypto.c
+++ b/libnm-core/nm-crypto.c
@@ -23,7 +23,7 @@
#include "nm-default.h"
-#include "crypto.h"
+#include "nm-crypto.h"
#include <string.h>
#include <strings.h>
diff --git a/libnm-core/crypto.h b/libnm-core/nm-crypto.h
index 60d8e18973..cb74a8c953 100644
--- a/libnm-core/crypto.h
+++ b/libnm-core/nm-crypto.h
@@ -21,8 +21,8 @@
* Copyright 2007 - 2014 Red Hat, Inc.
*/
-#ifndef __CRYPTO_H__
-#define __CRYPTO_H__
+#ifndef __NM_CRYPTO_H__
+#define __NM_CRYPTO_H__
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE)
#error Cannot use this header.
@@ -134,4 +134,4 @@ gboolean crypto_verify_pkcs8 (const guint8 *data,
const char *password,
GError **error);
-#endif /* __CRYPTO_H__ */
+#endif /* __NM_CRYPTO_H__ */
diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c
index f8e0d270e6..583f98f201 100644
--- a/libnm-core/nm-setting-8021x.c
+++ b/libnm-core/nm-setting-8021x.c
@@ -27,7 +27,7 @@
#include <string.h>
#include "nm-utils.h"
-#include "crypto.h"
+#include "nm-crypto.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
#include "nm-core-enum-types.h"
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index 3fb1188fae..253606ddcc 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -43,7 +43,7 @@
#include "nm-common-macros.h"
#include "nm-utils-private.h"
#include "nm-setting-private.h"
-#include "crypto.h"
+#include "nm-crypto.h"
#include "nm-setting-bond.h"
#include "nm-setting-bridge.h"
#include "nm-setting-infiniband.h"
diff --git a/libnm-core/tests/test-crypto.c b/libnm-core/tests/test-crypto.c
index 76414d1788..8b447d2685 100644
--- a/libnm-core/tests/test-crypto.c
+++ b/libnm-core/tests/test-crypto.c
@@ -28,7 +28,7 @@
#include <stdio.h>
#include <string.h>
-#include "crypto.h"
+#include "nm-crypto.h"
#include "nm-utils.h"
#include "nm-errors.h"
#include "nm-core-internal.h"
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ee78d29344..942b066131 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -51,9 +51,9 @@ clients/tui/nmtui-connect.c
clients/tui/nmtui-edit.c
clients/tui/nmtui-hostname.c
clients/tui/nmtui.c
-libnm-core/crypto.c
-libnm-core/crypto_gnutls.c
-libnm-core/crypto_nss.c
+libnm-core/nm-crypto.c
+libnm-core/nm-crypto-gnutls.c
+libnm-core/nm-crypto-nss.c
libnm-core/nm-connection.c
libnm-core/nm-dbus-utils.c
libnm-core/nm-keyfile.c