[NetworkManager-openvpn/th/auth-validation: 6/10] all: add and use defines for secret flag keys



commit 3b591ad6c4d59d17315533ab15b7184c4c8df839
Author: Thomas Haller <thaller redhat com>
Date:   Thu Sep 27 09:39:09 2018 +0200

    all: add and use defines for secret flag keys

 properties/nm-openvpn-editor.c |  13 +++--
 shared/nm-service-defines.h    | 125 +++++++++++++++++++++--------------------
 src/nm-openvpn-service.c       | 106 +++++++++++++++++-----------------
 3 files changed, 125 insertions(+), 119 deletions(-)
---
diff --git a/properties/nm-openvpn-editor.c b/properties/nm-openvpn-editor.c
index 8dd8218..89b296e 100644
--- a/properties/nm-openvpn-editor.c
+++ b/properties/nm-openvpn-editor.c
@@ -756,11 +756,12 @@ advanced_dialog_new_hash_from_connection (NMConnection *connection,
                                     g_strdup (NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD),
                                     g_strdup (secret));
        }
-       flags = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD"-flags");
-       if (flags)
+       flags = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD_FLAGS);
+       if (flags) {
                g_hash_table_insert (hash,
-                                    g_strdup (NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD"-flags"),
+                                    g_strdup (NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD_FLAGS),
                                     g_strdup (flags));
+       }
 
        return hash;
 }
@@ -1541,7 +1542,7 @@ advanced_dialog_new (GHashTable *hash, const char *contype)
                        gtk_entry_set_text (GTK_ENTRY (widget), value);
                }
 
-               value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD"-flags");
+               value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD_FLAGS);
                G_STATIC_ASSERT_EXPR (((guint) (NMSettingSecretFlags) 0xFFFFu) == 0xFFFFu);
                pw_flags = _nm_utils_ascii_str_to_int64 (value, 10, 0, 0xFFFF, NM_SETTING_SECRET_FLAG_NONE);
        } else
@@ -1937,7 +1938,7 @@ advanced_dialog_new_hash_from_dialog (GtkWidget *dialog, GError **error)
                                pw_flags = nma_utils_menu_to_secret_flags (widget);
                                if (pw_flags != NM_SETTING_SECRET_FLAG_NONE) {
                                        g_hash_table_insert (hash,
-                                                            g_strdup 
(NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD"-flags"),
+                                                            g_strdup 
(NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD_FLAGS),
                                                             g_strdup_printf ("%d", pw_flags));
                                }
                        }
@@ -2517,7 +2518,7 @@ hash_copy_advanced (gpointer key, gpointer data, gpointer user_data)
        g_return_if_fail (value && *value);
 
        /* HTTP Proxy password is a secret, not a data item */
-       if (!strcmp (key, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD))
+       if (NM_IN_SET (key, NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD))
                nm_setting_vpn_add_secret (s_vpn, (const char *) key, value);
        else
                nm_setting_vpn_add_data_item (s_vpn, (const char *) key, value);
diff --git a/shared/nm-service-defines.h b/shared/nm-service-defines.h
index 9fb50a0..340d8d0 100644
--- a/shared/nm-service-defines.h
+++ b/shared/nm-service-defines.h
@@ -28,73 +28,78 @@
 #define NM_DBUS_INTERFACE_OPENVPN  "org.freedesktop.NetworkManager.openvpn"
 #define NM_DBUS_PATH_OPENVPN       "/org/freedesktop/NetworkManager/openvpn"
 
-#define NM_OPENVPN_KEY_AUTH "auth"
-#define NM_OPENVPN_KEY_CA "ca"
-#define NM_OPENVPN_KEY_CERT "cert"
-#define NM_OPENVPN_KEY_CIPHER "cipher"
-#define NM_OPENVPN_KEY_COMP_LZO "comp-lzo"
-#define NM_OPENVPN_KEY_CONNECTION_TYPE "connection-type"
-#define NM_OPENVPN_KEY_CONNECT_TIMEOUT "connect-timeout"
-#define NM_OPENVPN_KEY_CRL_VERIFY_FILE "crl-verify-file"
-#define NM_OPENVPN_KEY_CRL_VERIFY_DIR "crl-verify-dir"
-#define NM_OPENVPN_KEY_DEV "dev"
-#define NM_OPENVPN_KEY_DEV_TYPE "dev-type"
-#define NM_OPENVPN_KEY_EXTRA_CERTS "extra-certs"
-#define NM_OPENVPN_KEY_FLOAT "float"
-#define NM_OPENVPN_KEY_FRAGMENT_SIZE "fragment-size"
-#define NM_OPENVPN_KEY_HTTP_PROXY_USERNAME "http-proxy-username"
-#define NM_OPENVPN_KEY_KEY "key"
-#define NM_OPENVPN_KEY_KEYSIZE "keysize"
-#define NM_OPENVPN_KEY_LOCAL_IP "local-ip" /* ??? */
-#define NM_OPENVPN_KEY_MAX_ROUTES "max-routes"
-#define NM_OPENVPN_KEY_MSSFIX "mssfix"
-#define NM_OPENVPN_KEY_MTU_DISC "mtu-disc"
-#define NM_OPENVPN_KEY_NS_CERT_TYPE "ns-cert-type"
-#define NM_OPENVPN_KEY_PING "ping"
-#define NM_OPENVPN_KEY_PING_EXIT "ping-exit"
-#define NM_OPENVPN_KEY_PING_RESTART "ping-restart"
-#define NM_OPENVPN_KEY_PORT "port"
-#define NM_OPENVPN_KEY_PROTO_TCP "proto-tcp"
-#define NM_OPENVPN_KEY_PROXY_PORT "proxy-port"
-#define NM_OPENVPN_KEY_PROXY_RETRY "proxy-retry"
-#define NM_OPENVPN_KEY_PROXY_SERVER "proxy-server"
-#define NM_OPENVPN_KEY_PROXY_TYPE "proxy-type"
-#define NM_OPENVPN_KEY_REMOTE "remote"
-#define NM_OPENVPN_KEY_REMOTE_CERT_TLS "remote-cert-tls"
-#define NM_OPENVPN_KEY_REMOTE_IP "remote-ip"
-#define NM_OPENVPN_KEY_REMOTE_RANDOM "remote-random"
-#define NM_OPENVPN_KEY_RENEG_SECONDS "reneg-seconds"
-#define NM_OPENVPN_KEY_STATIC_KEY "static-key"
-#define NM_OPENVPN_KEY_STATIC_KEY_DIRECTION "static-key-direction"
-#define NM_OPENVPN_KEY_TA "ta"
-#define NM_OPENVPN_KEY_TAP_DEV "tap-dev"
-#define NM_OPENVPN_KEY_TA_DIR "ta-dir"
-#define NM_OPENVPN_KEY_TLS_CIPHER "tls-cipher"
-#define NM_OPENVPN_KEY_TLS_CRYPT "tls-crypt"
-#define NM_OPENVPN_KEY_TLS_REMOTE "tls-remote"
-#define NM_OPENVPN_KEY_TUNNEL_MTU "tunnel-mtu"
-#define NM_OPENVPN_KEY_TUN_IPV6 "tun-ipv6"
-#define NM_OPENVPN_KEY_USERNAME "username"
-#define NM_OPENVPN_KEY_VERIFY_X509_NAME "verify-x509-name"
+#define NM_OPENVPN_KEY_AUTH                      "auth"
+#define NM_OPENVPN_KEY_CA                        "ca"
+#define NM_OPENVPN_KEY_CERT                      "cert"
+#define NM_OPENVPN_KEY_CIPHER                    "cipher"
+#define NM_OPENVPN_KEY_COMP_LZO                  "comp-lzo"
+#define NM_OPENVPN_KEY_CONNECTION_TYPE           "connection-type"
+#define NM_OPENVPN_KEY_CONNECT_TIMEOUT           "connect-timeout"
+#define NM_OPENVPN_KEY_CRL_VERIFY_FILE           "crl-verify-file"
+#define NM_OPENVPN_KEY_CRL_VERIFY_DIR            "crl-verify-dir"
+#define NM_OPENVPN_KEY_DEV                       "dev"
+#define NM_OPENVPN_KEY_DEV_TYPE                  "dev-type"
+#define NM_OPENVPN_KEY_EXTRA_CERTS               "extra-certs"
+#define NM_OPENVPN_KEY_FLOAT                     "float"
+#define NM_OPENVPN_KEY_FRAGMENT_SIZE             "fragment-size"
+#define NM_OPENVPN_KEY_HTTP_PROXY_USERNAME       "http-proxy-username"
+#define NM_OPENVPN_KEY_KEY                       "key"
+#define NM_OPENVPN_KEY_KEYSIZE                   "keysize"
+#define NM_OPENVPN_KEY_LOCAL_IP                  "local-ip" /* ??? */
+#define NM_OPENVPN_KEY_MAX_ROUTES                "max-routes"
+#define NM_OPENVPN_KEY_MSSFIX                    "mssfix"
+#define NM_OPENVPN_KEY_MTU_DISC                  "mtu-disc"
+#define NM_OPENVPN_KEY_NS_CERT_TYPE              "ns-cert-type"
+#define NM_OPENVPN_KEY_PING                      "ping"
+#define NM_OPENVPN_KEY_PING_EXIT                 "ping-exit"
+#define NM_OPENVPN_KEY_PING_RESTART              "ping-restart"
+#define NM_OPENVPN_KEY_PORT                      "port"
+#define NM_OPENVPN_KEY_PROTO_TCP                 "proto-tcp"
+#define NM_OPENVPN_KEY_PROXY_PORT                "proxy-port"
+#define NM_OPENVPN_KEY_PROXY_RETRY               "proxy-retry"
+#define NM_OPENVPN_KEY_PROXY_SERVER              "proxy-server"
+#define NM_OPENVPN_KEY_PROXY_TYPE                "proxy-type"
+#define NM_OPENVPN_KEY_REMOTE                    "remote"
+#define NM_OPENVPN_KEY_REMOTE_CERT_TLS           "remote-cert-tls"
+#define NM_OPENVPN_KEY_REMOTE_IP                 "remote-ip"
+#define NM_OPENVPN_KEY_REMOTE_RANDOM             "remote-random"
+#define NM_OPENVPN_KEY_RENEG_SECONDS             "reneg-seconds"
+#define NM_OPENVPN_KEY_STATIC_KEY                "static-key"
+#define NM_OPENVPN_KEY_STATIC_KEY_DIRECTION      "static-key-direction"
+#define NM_OPENVPN_KEY_TA                        "ta"
+#define NM_OPENVPN_KEY_TAP_DEV                   "tap-dev"
+#define NM_OPENVPN_KEY_TA_DIR                    "ta-dir"
+#define NM_OPENVPN_KEY_TLS_CIPHER                "tls-cipher"
+#define NM_OPENVPN_KEY_TLS_CRYPT                 "tls-crypt"
+#define NM_OPENVPN_KEY_TLS_REMOTE                "tls-remote"
+#define NM_OPENVPN_KEY_TUNNEL_MTU                "tunnel-mtu"
+#define NM_OPENVPN_KEY_TUN_IPV6                  "tun-ipv6"
+#define NM_OPENVPN_KEY_USERNAME                  "username"
+#define NM_OPENVPN_KEY_VERIFY_X509_NAME          "verify-x509-name"
+
+#define NM_OPENVPN_KEY_PASSWORD                  "password"
+#define NM_OPENVPN_KEY_CERTPASS                  "cert-pass"
+#define NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD       "http-proxy-password"
+
+#define NM_OPENVPN_KEY_PASSWORD_FLAGS            "password-flags"
+#define NM_OPENVPN_KEY_CERTPASS_FLAGS            "cert-pass-flags"
+#define NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD_FLAGS "http-proxy-password-flags"
 
-#define NM_OPENVPN_KEY_PASSWORD "password"
-#define NM_OPENVPN_KEY_CERTPASS "cert-pass"
-#define NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD "http-proxy-password"
 /* Internal auth-dialog -> service token indicating that no secrets are
  * required for the connection.
  */
-#define NM_OPENVPN_KEY_NOSECRET "no-secret"
+#define NM_OPENVPN_KEY_NOSECRET                  "no-secret"
 
 
-#define NM_OPENVPN_AUTH_MD5  "MD5"
-#define NM_OPENVPN_AUTH_NONE "none"
+#define NM_OPENVPN_AUTH_MD5       "MD5"
+#define NM_OPENVPN_AUTH_NONE      "none"
 #define NM_OPENVPN_AUTH_RIPEMD160 "RIPEMD160"
-#define NM_OPENVPN_AUTH_RSA_MD4 "RSA-MD4"
-#define NM_OPENVPN_AUTH_SHA1 "SHA1"
-#define NM_OPENVPN_AUTH_SHA224 "SHA224"
-#define NM_OPENVPN_AUTH_SHA256 "SHA256"
-#define NM_OPENVPN_AUTH_SHA384 "SHA384"
-#define NM_OPENVPN_AUTH_SHA512 "SHA512"
+#define NM_OPENVPN_AUTH_RSA_MD4   "RSA-MD4"
+#define NM_OPENVPN_AUTH_SHA1      "SHA1"
+#define NM_OPENVPN_AUTH_SHA224    "SHA224"
+#define NM_OPENVPN_AUTH_SHA256    "SHA256"
+#define NM_OPENVPN_AUTH_SHA384    "SHA384"
+#define NM_OPENVPN_AUTH_SHA512    "SHA512"
 
 #define NM_OPENVPN_CONTYPE_PASSWORD     "password"
 #define NM_OPENVPN_CONTYPE_PASSWORD_TLS "password-tls"
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 46bce99..05c1bb6 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -140,59 +140,59 @@ typedef struct {
 } ValidProperty;
 
 static const ValidProperty valid_properties[] = {
-       { NM_OPENVPN_KEY_AUTH,                 G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_CA,                   G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_CERT,                 G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_CIPHER,               G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_KEYSIZE,              G_TYPE_INT, 1, 65535, FALSE },
-       { NM_OPENVPN_KEY_COMP_LZO,             G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_CONNECT_TIMEOUT,      G_TYPE_INT, 0, G_MAXINT, FALSE },
-       { NM_OPENVPN_KEY_CONNECTION_TYPE,      G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_CRL_VERIFY_FILE,      G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_CRL_VERIFY_DIR,       G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_EXTRA_CERTS,          G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_FLOAT,                G_TYPE_BOOLEAN, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_FRAGMENT_SIZE,        G_TYPE_INT, 0, G_MAXINT, FALSE },
-       { NM_OPENVPN_KEY_KEY,                  G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_LOCAL_IP,             G_TYPE_STRING, 0, 0, TRUE },
-       { NM_OPENVPN_KEY_MSSFIX,               G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_MTU_DISC,             G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_PING,                 G_TYPE_INT, 0, G_MAXINT, FALSE },
-       { NM_OPENVPN_KEY_PING_EXIT,            G_TYPE_INT, 0, G_MAXINT, FALSE },
-       { NM_OPENVPN_KEY_PING_RESTART,         G_TYPE_INT, 0, G_MAXINT, FALSE },
-       { NM_OPENVPN_KEY_MAX_ROUTES,           G_TYPE_INT, 0, 100000000, FALSE },
-       { NM_OPENVPN_KEY_PROTO_TCP,            G_TYPE_BOOLEAN, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_PORT,                 G_TYPE_INT, 1, 65535, FALSE },
-       { NM_OPENVPN_KEY_PROXY_TYPE,           G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_PROXY_SERVER,         G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_PROXY_PORT,           G_TYPE_INT, 1, 65535, FALSE },
-       { NM_OPENVPN_KEY_PROXY_RETRY,          G_TYPE_BOOLEAN, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_HTTP_PROXY_USERNAME,  G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_REMOTE,               G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_REMOTE_RANDOM,        G_TYPE_BOOLEAN, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_REMOTE_IP,            G_TYPE_STRING, 0, 0, TRUE },
-       { NM_OPENVPN_KEY_RENEG_SECONDS,        G_TYPE_INT, 0, G_MAXINT, FALSE },
-       { NM_OPENVPN_KEY_STATIC_KEY,           G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_STATIC_KEY_DIRECTION, G_TYPE_INT, 0, 1, FALSE },
-       { NM_OPENVPN_KEY_TA,                   G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_TA_DIR,               G_TYPE_INT, 0, 1, FALSE },
-       { NM_OPENVPN_KEY_TAP_DEV,              G_TYPE_BOOLEAN, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_DEV,                  G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_DEV_TYPE,             G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_TUN_IPV6,             G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_TLS_CIPHER,           G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_TLS_CRYPT,            G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_TLS_REMOTE,           G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_VERIFY_X509_NAME,     G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_REMOTE_CERT_TLS,      G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_NS_CERT_TYPE,         G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_TUNNEL_MTU,           G_TYPE_INT, 0, G_MAXINT, FALSE },
-       { NM_OPENVPN_KEY_USERNAME,             G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_PASSWORD"-flags",     G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_CERTPASS"-flags",     G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_NOSECRET,             G_TYPE_STRING, 0, 0, FALSE },
-       { NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD"-flags", G_TYPE_STRING, 0, 0, FALSE },
-       { NULL,                                G_TYPE_NONE, FALSE }
+       { NM_OPENVPN_KEY_AUTH,                      G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_CA,                        G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_CERT,                      G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_CIPHER,                    G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_KEYSIZE,                   G_TYPE_INT, 1, 65535, FALSE },
+       { NM_OPENVPN_KEY_COMP_LZO,                  G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_CONNECT_TIMEOUT,           G_TYPE_INT, 0, G_MAXINT, FALSE },
+       { NM_OPENVPN_KEY_CONNECTION_TYPE,           G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_CRL_VERIFY_FILE,           G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_CRL_VERIFY_DIR,            G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_EXTRA_CERTS,               G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_FLOAT,                     G_TYPE_BOOLEAN, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_FRAGMENT_SIZE,             G_TYPE_INT, 0, G_MAXINT, FALSE },
+       { NM_OPENVPN_KEY_KEY,                       G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_LOCAL_IP,                  G_TYPE_STRING, 0, 0, TRUE },
+       { NM_OPENVPN_KEY_MSSFIX,                    G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_MTU_DISC,                  G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_PING,                      G_TYPE_INT, 0, G_MAXINT, FALSE },
+       { NM_OPENVPN_KEY_PING_EXIT,                 G_TYPE_INT, 0, G_MAXINT, FALSE },
+       { NM_OPENVPN_KEY_PING_RESTART,              G_TYPE_INT, 0, G_MAXINT, FALSE },
+       { NM_OPENVPN_KEY_MAX_ROUTES,                G_TYPE_INT, 0, 100000000, FALSE },
+       { NM_OPENVPN_KEY_PROTO_TCP,                 G_TYPE_BOOLEAN, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_PORT,                      G_TYPE_INT, 1, 65535, FALSE },
+       { NM_OPENVPN_KEY_PROXY_TYPE,                G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_PROXY_SERVER,              G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_PROXY_PORT,                G_TYPE_INT, 1, 65535, FALSE },
+       { NM_OPENVPN_KEY_PROXY_RETRY,               G_TYPE_BOOLEAN, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_HTTP_PROXY_USERNAME,       G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_REMOTE,                    G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_REMOTE_RANDOM,             G_TYPE_BOOLEAN, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_REMOTE_IP,                 G_TYPE_STRING, 0, 0, TRUE },
+       { NM_OPENVPN_KEY_RENEG_SECONDS,             G_TYPE_INT, 0, G_MAXINT, FALSE },
+       { NM_OPENVPN_KEY_STATIC_KEY,                G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_STATIC_KEY_DIRECTION,      G_TYPE_INT, 0, 1, FALSE },
+       { NM_OPENVPN_KEY_TA,                        G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_TA_DIR,                    G_TYPE_INT, 0, 1, FALSE },
+       { NM_OPENVPN_KEY_TAP_DEV,                   G_TYPE_BOOLEAN, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_DEV,                       G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_DEV_TYPE,                  G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_TUN_IPV6,                  G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_TLS_CIPHER,                G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_TLS_CRYPT,                 G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_TLS_REMOTE,                G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_VERIFY_X509_NAME,          G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_REMOTE_CERT_TLS,           G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_NS_CERT_TYPE,              G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_TUNNEL_MTU,                G_TYPE_INT, 0, G_MAXINT, FALSE },
+       { NM_OPENVPN_KEY_USERNAME,                  G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_PASSWORD_FLAGS,            G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_CERTPASS_FLAGS,            G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_NOSECRET,                  G_TYPE_STRING, 0, 0, FALSE },
+       { NM_OPENVPN_KEY_HTTP_PROXY_PASSWORD_FLAGS, G_TYPE_STRING, 0, 0, FALSE },
+       { NULL,                                     G_TYPE_NONE, FALSE }
 };
 
 static const ValidProperty valid_secrets[] = {


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