[libnma/ac/owe] wireless security: change SAE compatibility macro to the compatibility file




commit 7e81b642ec7cba72aee45b178a1d1857b9945a30
Author: Ana Cabral <acabral redhat com>
Date:   Wed Mar 9 12:39:22 2022 -0300

    wireless security: change SAE compatibility macro to the compatibility file

 shared/nm-libnm-compat.h | 6 ++++++
 src/nma-wifi-dialog.c    | 3 ---
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/shared/nm-libnm-compat.h b/shared/nm-libnm-compat.h
index fa66703e..8f8de685 100644
--- a/shared/nm-libnm-compat.h
+++ b/shared/nm-libnm-compat.h
@@ -28,6 +28,12 @@
                G_GNUC_END_IGNORE_DEPRECATIONS \
        })
 
+#define _NMU_SEC_SAE ((NMUtilsSecurityType) 9)
+#if !NM_CHECK_VERSION (1,22,0)
+#define NMU_SEC_SAE _NMU_SEC_SAE
+#endif
+G_STATIC_ASSERT(NMU_SEC_SAE == _NMU_SEC_SAE);
+
 #define _NMU_SEC_OWE ((NMUtilsSecurityType) 10)
 #if !NM_CHECK_VERSION (1,24,0)
 #define NMU_SEC_OWE _NMU_SEC_OWE
diff --git a/src/nma-wifi-dialog.c b/src/nma-wifi-dialog.c
index 06c9af0e..0c1ad94e 100644
--- a/src/nma-wifi-dialog.c
+++ b/src/nma-wifi-dialog.c
@@ -18,9 +18,6 @@
 #include "nma-ws.h"
 #include "nma-eap.h"
 
-/* For compatibility with NetworkManager-1.20 and earlier. */
-#define NMU_SEC_SAE 9
-
 G_DEFINE_TYPE (NMAWifiDialog, nma_wifi_dialog, GTK_TYPE_DIALOG)
 
 #define NMA_WIFI_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]