[network-manager-fortisslvpn/nm-1-0] service: add support for user certificates
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-fortisslvpn/nm-1-0] service: add support for user certificates
- Date: Mon, 28 Sep 2015 10:16:50 +0000 (UTC)
commit 4d65cb27376306c1e33d5eacf41cadcfb4f62d0e
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Sat Sep 26 09:25:56 2015 +0200
service: add support for user certificates
(cherry picked from commit 905aa31d698efebcc53cedf388bf1b88230604ab)
src/nm-fortisslvpn-service-defines.h | 2 ++
src/nm-fortisslvpn-service.c | 14 ++++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/nm-fortisslvpn-service-defines.h b/src/nm-fortisslvpn-service-defines.h
index 6a61e13..7e707c0 100644
--- a/src/nm-fortisslvpn-service-defines.h
+++ b/src/nm-fortisslvpn-service-defines.h
@@ -33,6 +33,8 @@
#define NM_FORTISSLVPN_KEY_USER "user"
#define NM_FORTISSLVPN_KEY_PASSWORD "password"
#define NM_FORTISSLVPN_KEY_CA "ca"
+#define NM_FORTISSLVPN_KEY_CERT "cert"
+#define NM_FORTISSLVPN_KEY_KEY "key"
#define NM_FORTISSLVPN_KEY_TRUSTED_CERT "trusted-cert"
#endif /* NM_FORTISSLVPN_PLUGIN_H */
diff --git a/src/nm-fortisslvpn-service.c b/src/nm-fortisslvpn-service.c
index 2cb58ca..b040611 100644
--- a/src/nm-fortisslvpn-service.c
+++ b/src/nm-fortisslvpn-service.c
@@ -326,6 +326,8 @@ static ValidProperty valid_properties[] = {
{ NM_FORTISSLVPN_KEY_USER, G_TYPE_STRING, TRUE },
{ NM_FORTISSLVPN_KEY_CA, G_TYPE_STRING, FALSE },
{ NM_FORTISSLVPN_KEY_TRUSTED_CERT, G_TYPE_STRING, FALSE },
+ { NM_FORTISSLVPN_KEY_CERT, G_TYPE_STRING, FALSE },
+ { NM_FORTISSLVPN_KEY_KEY, G_TYPE_STRING, FALSE },
{ NM_FORTISSLVPN_KEY_PASSWORD"-flags", G_TYPE_UINT, FALSE },
{ NULL, G_TYPE_NONE, FALSE }
};
@@ -674,6 +676,18 @@ run_openfortivpn (NMFortisslvpnPlugin *plugin, NMSettingVPN *s_vpn, GError **err
g_ptr_array_add (argv, (gpointer) g_strdup (value));
}
+ value = nm_setting_vpn_get_data_item (s_vpn, NM_FORTISSLVPN_KEY_CERT);
+ if (value) {
+ g_ptr_array_add (argv, (gpointer) g_strdup ("--user-cert"));
+ g_ptr_array_add (argv, (gpointer) g_strdup (value));
+ }
+
+ value = nm_setting_vpn_get_data_item (s_vpn, NM_FORTISSLVPN_KEY_KEY);
+ if (value) {
+ g_ptr_array_add (argv, (gpointer) g_strdup ("--user-key"));
+ g_ptr_array_add (argv, (gpointer) g_strdup (value));
+ }
+
value = nm_setting_vpn_get_data_item (s_vpn, NM_FORTISSLVPN_KEY_TRUSTED_CERT);
if (value) {
g_ptr_array_add (argv, (gpointer) g_strdup ("--trusted-cert"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]