diff --git a/vpn-daemons/openvpn/ChangeLog b/vpn-daemons/openvpn/ChangeLog index 8379e63258..7ea8af560c 100644 --- a/vpn-daemons/openvpn/ChangeLog +++ b/vpn-daemons/openvpn/ChangeLog @@ -1,3 +1,11 @@ +2007-02-26 Dan Williams + + Patch from Jon Nettleton + + * properties/nm-openvpn-dialog.glade + properties/nm-openvpn.c + - Reduce size of OpenVPN configuration dialog (Gnome.org #410669) + 2007-02-02 Dan Williams * src/nm-openvpn-service.c diff --git a/vpn-daemons/openvpn/properties/nm-openvpn-dialog.glade b/vpn-daemons/openvpn/properties/nm-openvpn-dialog.glade index 9641e5ef62..846671ab50 100644 --- a/vpn-daemons/openvpn/properties/nm-openvpn-dialog.glade +++ b/vpn-daemons/openvpn/properties/nm-openvpn-dialog.glade @@ -25,37 +25,37 @@ False 6 - - - True - Please enter the information provided by your system administrator below. Do not enter your password here as you will be prompted when connecting. - False - False - GTK_JUSTIFY_LEFT - True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - True - - - True False 6 + + + True + Please enter the information provided by your system administrator below. Do not enter your password here as you will be prompted when connecting. + False + True + GTK_JUSTIFY_LEFT + True + False + 0 + 0.5 + 2 + 1 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + True @@ -67,15 +67,15 @@ False 0 0.5 - 0 - 0 + 2 + 1 PANGO_ELLIPSIZE_NONE -1 False 0 - 0 + 2 False True @@ -90,7 +90,7 @@ 1 0 0 - 12 + 6 0 @@ -100,41 +100,34 @@ 6 - + True - _Name used to identify the connection to the private network, e.g. "Campus VPN" or "Corporate Network" - True - False - GTK_JUSTIFY_LEFT - True - False - 0 + 0.5 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - True - - + 1 + 1 + 0 + 0 + 0 + 6 - - - True - True - True - True - 0 - - True - * - False + + + True + Name used to identify the connection to the private network, e.g. "Campus VPN" or "Corporate Network" + True + True + True + 0 + + True + False + + Connection Name + Name used to identify the connection to the private network, e.g. "Campus VPN" or "Corporate Network" + + + 0 @@ -151,6 +144,31 @@ True + + + + True + <b>Connection Information</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 1 + 2 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + False + False + + 0 @@ -160,15 +178,1718 @@ - + + 1 True - False - 6 + True + True + True + GTK_POS_TOP + False + False - + True - <b>Required Information</b> + 4 + 3 + False + 6 + 12 + + + + True + Gateway _Port: + True + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + openvpn-port + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + False + False + GTK_POS_LEFT + False + False + + + + True + False + 6 + + + + 6 + True + 3 + 3 + False + 6 + 12 + + + + True + True + False + True + 0 + + True + False + + + 1 + 2 + 0 + 1 + + + + + + True + CA file: + True + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + openvpn-ca + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + Certificate: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + False + True + 0 + + True + False + + + 1 + 2 + 1 + 2 + + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 2 + 3 + 1 + 2 + fill + + + + + + + True + Key: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + True + False + True + 0 + + True + False + + + 1 + 2 + 2 + 3 + + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 2 + 3 + 2 + 3 + fill + + + + + + 0 + False + True + + + + + False + True + + + + + + True + X.509 + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 6 + + + + 6 + True + 3 + 3 + False + 6 + 12 + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 0 + 1 + + + + + + True + Shared Key: + True + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + openvpn-ca + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + Local IP: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 1 + 2 + + + + + + + True + Remote IP: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 2 + 3 + + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 2 + 3 + 0 + 1 + fill + + + + + + 0 + False + True + + + + + False + True + + + + + + True + Shared key + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 6 + + + + 6 + True + 3 + 3 + False + 6 + 12 + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 0 + 1 + + + + + + True + CA file: + True + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + openvpn-ca + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + Username: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 1 + 2 + + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 8 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 2 + 3 + fill + + + + + + 0 + False + True + + + + + False + True + + + + + + True + Password + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + + True + False + 6 + + + + 6 + True + 4 + 3 + False + 6 + 12 + + + + True + True + False + True + 0 + + True + False + + + 1 + 2 + 0 + 1 + + + + + + True + CA file: + True + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + openvpn-ca + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + True + Certificate: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + False + True + 0 + + True + False + + + 1 + 2 + 1 + 2 + + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 2 + 3 + 0 + 1 + fill + + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 2 + 3 + 1 + 2 + fill + + + + + + + True + Key: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-open + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 2 + 3 + 2 + 3 + fill + + + + + + + True + Username: + False + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 3 + 4 + + + + + + + True + True + False + True + 0 + + True + False + + + 1 + 2 + 2 + 3 + + + + + + 0 + False + True + + + + + False + True + + + + + + True + X.509/Pass + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + + + + 0 + 3 + 3 + 4 + fill + + + + + + True + X.509 Certificates +Pre-shared key +Password Authentication +X.509 with Password Authentication + False + True + + + 1 + 3 + 2 + 3 + 3 + fill + fill + + + + + + True + (Default: 1194) + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 2 + 3 + 1 + 2 + 3 + fill + + + + + + + True + _Gateway Address: + True + False + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + openvpn-remote + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + 3 + fill + + + + + + + True + Connection Type: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + 3 + fill + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 2 + 1 + 2 + 3 + + + + + + + True + True + True + True + 0 + + True + False + + + 1 + 3 + 0 + 1 + 3 + 3 + + + + + + False + True + + + + + + True + <b>Required</b> False True GTK_JUSTIFY_LEFT @@ -184,1180 +1905,10 @@ 0 - 0 - False - False + tab - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - 3 - 2 - False - 6 - 12 - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 0 - 1 - - - - - - - True - _Gateway: - True - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - openvpn-remote - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - Connection Type: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - X.509 Certificates -Pre-shared key -Password Authentication -X.509 with Password Authentication - False - True - - - 1 - 2 - 1 - 2 - fill - fill - - - - - - True - True - True - True - GTK_POS_TOP - False - False - - - - True - False - 6 - - - - 6 - True - 3 - 3 - False - 6 - 12 - - - - True - True - False - True - 0 - - True - * - False - - - 1 - 2 - 0 - 1 - - - - - - True - CA file: - True - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - openvpn-ca - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - True - Certificate: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - True - False - True - 0 - - True - * - False - - - 1 - 2 - 1 - 2 - - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-open - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 2 - 3 - 0 - 1 - fill - - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-open - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 2 - 3 - 1 - 2 - fill - - - - - - - True - Key: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - True - False - True - 0 - - True - * - False - - - 1 - 2 - 2 - 3 - - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-open - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 2 - 3 - 2 - 3 - fill - - - - - - 0 - False - True - - - - - False - True - - - - - - True - X.509 - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 6 - - - - 6 - True - 3 - 3 - False - 6 - 12 - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 0 - 1 - - - - - - True - Shared Key: - True - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - openvpn-ca - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - True - Local IP: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 1 - 2 - - - - - - - True - Remote IP: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 2 - 3 - - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-open - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 2 - 3 - 0 - 1 - fill - - - - - - 0 - False - True - - - - - False - True - - - - - - True - Shared key - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 6 - - - - 6 - True - 3 - 3 - False - 6 - 12 - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 0 - 1 - - - - - - True - CA file: - True - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - openvpn-ca - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - True - Username: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 1 - 2 - - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-open - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 2 - 3 - 0 - 1 - fill - - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 8 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 1 - 2 - 2 - 3 - fill - - - - - - 0 - False - True - - - - - False - True - - - - - - True - Password - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - 0 - 2 - 2 - 3 - fill - fill - - - - - - - 0 - True - True - - - - - 12 - False - True - - - - - - True - True - True - 3 - True @@ -1389,7 +1940,7 @@ X.509 with Password Authentication True - 0 + 3 False False @@ -1439,16 +1990,29 @@ X.509 with Password Authentication - + True - True - True - True - 0 - - True - * - False + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 0 + 3 + + + + True + True + True + True + 0 + + True + False + + 0 @@ -1549,14 +2113,28 @@ X.509 with Password Authentication - + True - - False - True + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 11 + 0 + + + + True + + False + True + + - 1 + 3 True True @@ -1581,31 +2159,6 @@ X.509 with Password Authentication False 0 - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 12 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - True @@ -1640,7 +2193,6 @@ X.509 with Password Authentication 0 True - * False @@ -1722,7 +2274,7 @@ X.509 with Password Authentication - 0 + 4 False False @@ -1736,119 +2288,108 @@ X.509 with Password Authentication - + True - - False - False - GTK_JUSTIFY_LEFT - False - False 0.5 0.5 - 12 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - 0 - True - True - - + 1 + 1 + 1 + 1 + 114 + 0 - - - True - False - 0 + + + True + False + 0 - - - True - Direction: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - + + + True + Direction: + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + - - - True - True - none - True - GTK_RELIEF_NORMAL - True - True - False - True - - - 0 - False - False - - + + + True + True + none + True + GTK_RELIEF_NORMAL + True + True + False + True + + + 0 + False + False + + - - - True - True - 0 - True - GTK_RELIEF_NORMAL - True - False - False - True - openvpn-ta-dir-none - - - 0 - False - False - - + + + True + True + 0 + True + GTK_RELIEF_NORMAL + True + False + False + True + openvpn-ta-dir-none + + + 0 + False + False + + - - - True - True - 1 - True - GTK_RELIEF_NORMAL - True - False - False - True - openvpn-ta-dir-none + + + True + True + 1 + True + GTK_RELIEF_NORMAL + True + False + False + True + openvpn-ta-dir-none + + + 0 + False + False + + + + 0 @@ -1871,71 +2412,23 @@ X.509 with Password Authentication - - 0 - True - True - + + False + True + - + True - <b>Optional Information</b> + Optional False True GTK_JUSTIFY_LEFT False False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - True - - - - - - True - - - 0 - False - True - - - - - - True - False - 4 - - - - True - Please note that the file you import is not an OpenVPN configuration file. Ask your administrator for the file. - False - False - GTK_JUSTIFY_LEFT - True - False 0 0.5 0 @@ -1946,11 +2439,22 @@ X.509 with Password Authentication 0 - 0 - False - False + tab + + + 0 + True + True + + + + + + True + False + 4 @@ -1959,71 +2463,89 @@ X.509 with Password Authentication 0 - + True - True - True - GTK_RELIEF_NORMAL - True + 0.5 + 0.5 + 1 + 1 + 0 + 3 + 0 + 3 - + True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 + Please note that the file you import is not an OpenVPN configuration file. Ask your adminstrator for the file. + True + True + GTK_RELIEF_NORMAL + True + + Please note that the file you import is not an OpenVPN configuration file. Ask your adminstrator for the file. + - + True - False - 2 + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 - + True - gtk-add - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - + False + 2 - - - True - _Import Saved Configuration... - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + + + True + gtk-add + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Import Saved Configuration... + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + - - 0 - False - False - diff --git a/vpn-daemons/openvpn/properties/nm-openvpn.c b/vpn-daemons/openvpn/properties/nm-openvpn.c index 30e266152a..0efc1ff612 100644 --- a/vpn-daemons/openvpn/properties/nm-openvpn.c +++ b/vpn-daemons/openvpn/properties/nm-openvpn.c @@ -52,6 +52,7 @@ struct _NetworkManagerVpnUIImpl { GtkEntry *w_connection_name; GtkEntry *w_remote; + GtkEntry *w_port; GtkEntry *w_ca; GtkEntry *w_cert; GtkEntry *w_key; @@ -74,6 +75,13 @@ struct _NetworkManagerVpnUIImpl { GtkEntry *w_username; GtkEntry *w_password_ca; GtkButton *w_button_password_ca; + GtkEntry *w_x509userpass_ca; + GtkEntry *w_x509userpass_cert; + GtkEntry *w_x509userpass_key; + GtkEntry *w_x509userpass_username; + GtkButton *w_button_x509userpass_ca; + GtkButton *w_button_x509userpass_cert; + GtkButton *w_button_x509userpass_key; GtkCheckButton *w_use_cipher; GtkComboBox *w_cipher; GtkCheckButton *w_use_ta; @@ -92,6 +100,7 @@ openvpn_clear_widget (NetworkManagerVpnUIImpl *impl) { gtk_entry_set_text (impl->w_connection_name, ""); gtk_entry_set_text (impl->w_remote, ""); + gtk_entry_set_text (impl->w_port, "1194"); gtk_entry_set_text (impl->w_ca, ""); gtk_entry_set_text (impl->w_cert, ""); gtk_entry_set_text (impl->w_key, ""); @@ -100,6 +109,10 @@ openvpn_clear_widget (NetworkManagerVpnUIImpl *impl) gtk_entry_set_text (impl->w_remote_ip, ""); gtk_entry_set_text (impl->w_username, ""); gtk_entry_set_text (impl->w_password_ca, ""); + gtk_entry_set_text (impl->w_x509userpass_ca, ""); + gtk_entry_set_text (impl->w_x509userpass_cert, ""); + gtk_entry_set_text (impl->w_x509userpass_key, ""); + gtk_entry_set_text (impl->w_x509userpass_username, ""); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_routes), FALSE); gtk_entry_set_text (impl->w_routes, ""); gtk_widget_set_sensitive (GTK_WIDGET (impl->w_routes), FALSE); @@ -187,6 +200,8 @@ impl_get_widget (NetworkManagerVpnUI *self, GSList *properties, GSList *routes, if (strcmp (key, "remote") == 0) { gtk_entry_set_text (impl->w_remote, value); + } else if (strcmp (key, "port") == 0) { + gtk_entry_set_text (impl->w_port, value); } else if (strcmp (key, "ca") == 0) { gtk_entry_set_text (impl->w_ca, value); } else if (strcmp (key, "cert") == 0) { @@ -279,6 +294,7 @@ impl_get_properties (NetworkManagerVpnUI *self) NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data; const char *connectionname; const char *remote; + const char *port; const char *ca; const char *cert; const char *key; @@ -294,6 +310,7 @@ impl_get_properties (NetworkManagerVpnUI *self) connectionname = gtk_entry_get_text (impl->w_connection_name); remote = gtk_entry_get_text (impl->w_remote); + port = gtk_entry_get_text (impl->w_port); ca = gtk_entry_get_text (impl->w_ca); cert = gtk_entry_get_text (impl->w_cert); key = gtk_entry_get_text (impl->w_key); @@ -327,6 +344,8 @@ impl_get_properties (NetworkManagerVpnUI *self) data = g_slist_append (data, use_tap ? g_strdup ("tap") : g_strdup("tun")); data = g_slist_append (data, g_strdup ("remote")); data = g_slist_append (data, g_strdup (remote)); + data = g_slist_append (data, g_strdup ("port")); + data = g_slist_append (data, g_strdup (port)); data = g_slist_append (data, g_strdup ("proto")); data = g_slist_append (data, use_tcp ? g_strdup ("tcp-client") : g_strdup("udp")); data = g_slist_append (data, g_strdup ("ca")); @@ -411,6 +430,26 @@ impl_get_routes (NetworkManagerVpnUI *self) } +/** Checks if port is an integer and + * less than 65 + */ +static gboolean +check_port (const char *port) +{ + int d; + + if (sscanf (port, "%d", &d) != 1) { + return FALSE; + } + + if (d < 1 || d > 65536 ) { + return FALSE; + } + + return TRUE; +} + + /** Checks if ip is in notation * a.b.c.d where a,b,c,d in {0..255} */ @@ -484,10 +523,12 @@ impl_is_valid (NetworkManagerVpnUI *self) const char *routes_entry; const char *connectionname; const char *remote; + const char *port; gint connection_type = gtk_combo_box_get_active (GTK_COMBO_BOX (impl->w_connection_type)); connectionname = gtk_entry_get_text (impl->w_connection_name); remote = gtk_entry_get_text (impl->w_remote); + port = gtk_entry_get_text (impl->w_port); use_routes = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (impl->w_use_routes)); routes_entry = gtk_entry_get_text (impl->w_routes); @@ -496,7 +537,11 @@ impl_is_valid (NetworkManagerVpnUI *self) if ( (strlen (connectionname) == 0) || (strlen (remote) == 0) || (strstr (remote, " ") != NULL) || - (strstr (remote, "\t") != NULL) ) { + (strstr (remote, "\t") != NULL) || + (strlen (port) == 0) || + (strstr (port, " ") != NULL) || + (strstr (port, "\t") != NULL) || + (!check_port (port)) ) { is_valid = FALSE; @@ -537,16 +582,15 @@ impl_is_valid (NetworkManagerVpnUI *self) } else if ( connection_type == NM_OPENVPN_CONTYPE_X509USERPASS ) { - const char *username; const char *ca; const char *cert; const char *key; + const char *username; - username = gtk_entry_get_text (impl->w_username); - ca = gtk_entry_get_text (impl->w_password_ca); - cert = gtk_entry_get_text (impl->w_cert); - key = gtk_entry_get_text (impl->w_key); - + ca = gtk_entry_get_text (impl->w_x509userpass_ca); + cert = gtk_entry_get_text (impl->w_x509userpass_cert); + key = gtk_entry_get_text (impl->w_x509userpass_key); + username = gtk_entry_get_text (impl->w_x509userpass_username); if (strlen (username) > 0 && strlen (ca) > 0 && @@ -567,9 +611,9 @@ impl_is_valid (NetworkManagerVpnUI *self) const char *cert; const char *key; - ca = gtk_entry_get_text (impl->w_ca); - cert = gtk_entry_get_text (impl->w_cert); - key = gtk_entry_get_text (impl->w_key); + ca = gtk_entry_get_text (impl->w_ca); + cert = gtk_entry_get_text (impl->w_cert); + key = gtk_entry_get_text (impl->w_key); /* initial sanity checking */ if (strlen (ca) > 0 && @@ -655,9 +699,33 @@ editable_changed (GtkEditable *editable, gpointer user_data) // connection we do not expect the value to change if ( GTK_ENTRY (editable) == impl->w_ca ) { gtk_entry_set_text ( impl->w_password_ca, gtk_entry_get_text (GTK_ENTRY (impl->w_ca))); + gtk_entry_set_text ( impl->w_x509userpass_ca, gtk_entry_get_text (GTK_ENTRY (impl->w_ca))); } else if ( GTK_ENTRY (editable) == impl->w_password_ca ) { gtk_entry_set_text ( impl->w_ca, gtk_entry_get_text (GTK_ENTRY (impl->w_password_ca))); + gtk_entry_set_text ( impl->w_x509userpass_ca, gtk_entry_get_text (GTK_ENTRY (impl->w_password_ca))); + } else if ( GTK_ENTRY (editable) == impl->w_x509userpass_ca ) { + gtk_entry_set_text ( impl->w_ca, gtk_entry_get_text (GTK_ENTRY (impl->w_x509userpass_ca))); + gtk_entry_set_text ( impl->w_password_ca, gtk_entry_get_text (GTK_ENTRY (impl->w_x509userpass_ca))); } + + if ( GTK_ENTRY (editable) == impl->w_cert ) { + gtk_entry_set_text ( impl->w_x509userpass_cert, gtk_entry_get_text (GTK_ENTRY (impl->w_cert))); + } else if ( GTK_ENTRY (editable) == impl->w_x509userpass_cert ) { + gtk_entry_set_text ( impl->w_cert, gtk_entry_get_text (GTK_ENTRY (impl->w_x509userpass_cert))); + } + + if ( GTK_ENTRY (editable) == impl->w_key ) { + gtk_entry_set_text ( impl->w_x509userpass_key, gtk_entry_get_text (GTK_ENTRY (impl->w_key))); + } else if ( GTK_ENTRY (editable) == impl->w_x509userpass_key ) { + gtk_entry_set_text ( impl->w_key, gtk_entry_get_text (GTK_ENTRY (impl->w_x509userpass_key))); + } + + if ( GTK_ENTRY (editable) == impl->w_username ) { + gtk_entry_set_text ( impl->w_x509userpass_username, gtk_entry_get_text (GTK_ENTRY (impl->w_username))); + } else if ( GTK_ENTRY (editable) == impl->w_x509userpass_username ) { + gtk_entry_set_text ( impl->w_username, gtk_entry_get_text (GTK_ENTRY (impl->w_x509userpass_username))); + } + } @@ -679,6 +747,7 @@ impl_get_confirmation_details (NetworkManagerVpnUI *self, gchar **retval) NetworkManagerVpnUIImpl *impl = (NetworkManagerVpnUIImpl *) self->data; const char *connectionname; const char *remote; + const char *port; const char *ca; const char *cert; const char *key; @@ -701,6 +770,7 @@ impl_get_confirmation_details (NetworkManagerVpnUI *self, gchar **retval) connectionname = gtk_entry_get_text (impl->w_connection_name); connection_type = gtk_combo_box_get_active (impl->w_connection_type); remote = gtk_entry_get_text (impl->w_remote); + port = gtk_entry_get_text (impl->w_port); cert = gtk_entry_get_text (impl->w_cert); key = gtk_entry_get_text (impl->w_key); shared_key = gtk_entry_get_text (impl->w_shared_key); @@ -773,7 +843,7 @@ impl_get_confirmation_details (NetworkManagerVpnUI *self, gchar **retval) break; case NM_OPENVPN_CONTYPE_X509USERPASS: - ca = gtk_entry_get_text (impl->w_ca); + ca = gtk_entry_get_text (impl->w_x509userpass_ca); g_string_append (buf, _("Connection Type: X.509 with Password Authentication")); @@ -795,6 +865,9 @@ impl_get_confirmation_details (NetworkManagerVpnUI *self, gchar **retval) g_string_append (buf, "\n\t"); g_string_append_printf (buf, _("Remote: %s"), remote); + g_string_append (buf, "\n\t"); + g_string_append_printf (buf, _("Port: %s"), port); + g_string_append (buf, "\n\t"); g_string_append_printf( buf, _("Device: %s"), ((use_tap) ? _("TAP") : _("TUN"))); @@ -840,6 +913,7 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) if (g_key_file_load_from_file (keyfile, path, 0, NULL)) { char *connectionname = NULL; char *remote = NULL; + char *port = NULL; char *ca = NULL; char *cert = NULL; char *key = NULL; @@ -855,11 +929,13 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) char *cipher = NULL; char *ta = NULL; char *ta_dir = NULL; + gint connection_type_sel = 0; gboolean should_expand; connectionname = g_key_file_get_string (keyfile, "openvpn", "description", NULL); connection_type = g_key_file_get_string (keyfile, "openvpn", "connection-type", NULL); remote = g_key_file_get_string (keyfile, "openvpn", "remote", NULL); + port = g_key_file_get_string (keyfile, "openvpn", "port", NULL); dev = g_key_file_get_string (keyfile, "openvpn", "dev", NULL); proto = g_key_file_get_string (keyfile, "openvpn", "proto", NULL); ca = g_key_file_get_string (keyfile, "openvpn", "ca", NULL); @@ -881,10 +957,12 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) /* sanity check data */ if ( (connectionname != NULL) && (remote != NULL ) && + (port != NULL ) && (dev != NULL) && (proto != NULL) && (connection_type != NULL) && (strlen (remote) > 0) && + (strlen (port) > 0) && (strlen (dev) > 0) && (strlen (proto) > 0) && (strlen (connectionname) > 0) ) { @@ -901,8 +979,12 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) gtk_entry_set_text (impl->w_ca, ca); gtk_entry_set_text (impl->w_password_ca, ca); + gtk_entry_set_text (impl->w_x509userpass_ca, ca); gtk_entry_set_text (impl->w_cert, cert); + gtk_entry_set_text (impl->w_x509userpass_cert, cert); gtk_entry_set_text (impl->w_key, key); + gtk_entry_set_text (impl->w_x509userpass_key, key); + connection_type_sel = NM_OPENVPN_CONTYPE_X509; } else { file_is_good = FALSE; } @@ -919,6 +1001,7 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) gtk_entry_set_text (impl->w_shared_key, shared_key); gtk_entry_set_text (impl->w_local_ip, local_ip); gtk_entry_set_text (impl->w_remote_ip, remote_ip); + connection_type_sel = NM_OPENVPN_CONTYPE_SHAREDKEY; } else { file_is_good = FALSE; } @@ -927,8 +1010,34 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) (strlen(username) > 0) ) { gtk_entry_set_text (impl->w_username, username); - gtk_entry_set_text (impl->w_password_ca, ca); + gtk_entry_set_text (impl->w_x509userpass_username, username); gtk_entry_set_text (impl->w_ca, ca); + gtk_entry_set_text (impl->w_password_ca, ca); + gtk_entry_set_text (impl->w_x509userpass_ca, ca); + connection_type_sel = NM_OPENVPN_CONTYPE_PASSWORD; + } else { + file_is_good = FALSE; + } + } else if (strcmp (connection_type, "x509userpass") == 0) { + if ( (ca != NULL ) && + (cert != NULL ) && + (key != NULL ) && + (username != NULL ) && + (strlen(ca) > 0) && + (strlen(cert) > 0) && + (strlen(key) > 0) && + (strlen(username) > 0) ) { + + gtk_entry_set_text (impl->w_ca, ca); + gtk_entry_set_text (impl->w_password_ca, ca); + gtk_entry_set_text (impl->w_x509userpass_ca, ca); + gtk_entry_set_text (impl->w_cert, cert); + gtk_entry_set_text (impl->w_x509userpass_cert, cert); + gtk_entry_set_text (impl->w_key, key); + gtk_entry_set_text (impl->w_x509userpass_key, key); + gtk_entry_set_text (impl->w_username, username); + gtk_entry_set_text (impl->w_x509userpass_username, username); + connection_type_sel = NM_OPENVPN_CONTYPE_X509USERPASS; } else { file_is_good = FALSE; } @@ -941,11 +1050,11 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) file_is_good = FALSE; } - if (cipher != NULL) { + if ((cipher != NULL) && (strlen (cipher) > 0)) { set_cipher(impl->w_cipher, impl->w_use_cipher, cipher); } - if (ta != NULL) { + if ((ta != NULL) && (strlen (ta) > 0)) { gtk_entry_set_text (impl->w_ta, ta); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_ta), TRUE); gtk_widget_set_sensitive (GTK_WIDGET (impl->w_ta), TRUE); @@ -955,13 +1064,13 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) gtk_widget_set_sensitive (GTK_WIDGET (impl->w_ta_dir_one), TRUE); } - if (ta_dir != NULL) { + if ((ta_dir != NULL) && (strlen (ta_dir) > 0)) { if (strcmp(ta_dir, "0") == 0) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(impl->w_ta_dir_zero), TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(impl->w_ta_dir_zero), TRUE); else if (strcmp(ta_dir, "1") == 0) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(impl->w_ta_dir_one), TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(impl->w_ta_dir_one), TRUE); else - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(impl->w_ta_dir_none), TRUE); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(impl->w_ta_dir_none), TRUE); } if (file_is_good) { @@ -970,6 +1079,15 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) gtk_entry_set_text (impl->w_connection_name, connectionname); gtk_entry_set_text (impl->w_remote, remote); + if ( check_port (port) ) { + gtk_entry_set_text (impl->w_port, port); + } else { + gtk_entry_set_text (impl->w_port, "1194"); + } + + gtk_combo_box_set_active (GTK_COMBO_BOX (impl->w_connection_type), connection_type_sel); + connection_type_changed (GTK_COMBO_BOX (impl->w_connection_type), impl); + if ( (lzo != NULL) && (strcmp(lzo, "yes") == 0) ) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (impl->w_use_lzo), TRUE); should_expand = TRUE; @@ -1012,6 +1130,7 @@ import_from_file (NetworkManagerVpnUIImpl *impl, const char *path) g_free (connectionname); g_free (connection_type); g_free (remote); + g_free (port); g_free (dev); g_free (proto); g_free (ca); @@ -1072,37 +1191,16 @@ connection_type_changed (GtkComboBox *box, gpointer user_data) case NM_OPENVPN_CONTYPE_X509: case NM_OPENVPN_CONTYPE_SHAREDKEY: case NM_OPENVPN_CONTYPE_PASSWORD: + case NM_OPENVPN_CONTYPE_X509USERPASS: { gtk_notebook_set_current_page( impl->w_settings_notebook, sel ); - for (i = NM_OPENVPN_CONTYPE_X509; i <= NM_OPENVPN_CONTYPE_PASSWORD; ++i) { + for (i = NM_OPENVPN_CONTYPE_X509; i <= NM_OPENVPN_CONTYPE_X509USERPASS; ++i) { GtkWidget *tab = GTK_WIDGET ( gtk_notebook_get_nth_page( GTK_NOTEBOOK (impl->w_settings_notebook), i)); gtk_widget_set_sensitive( tab, (i == sel)); gtk_widget_set_sensitive( GTK_WIDGET ( gtk_notebook_get_tab_label( GTK_NOTEBOOK (impl->w_settings_notebook), tab) ), (i == sel)); } } break; - case NM_OPENVPN_CONTYPE_X509USERPASS: - { - GtkWidget *tab; - - tab = GTK_WIDGET ( gtk_notebook_get_nth_page( GTK_NOTEBOOK (impl->w_settings_notebook), - NM_OPENVPN_CONTYPE_X509)); - gtk_widget_set_sensitive( tab, TRUE); - gtk_widget_set_sensitive( GTK_WIDGET ( gtk_notebook_get_tab_label( GTK_NOTEBOOK (impl->w_settings_notebook), tab) ), TRUE); - - tab = GTK_WIDGET ( gtk_notebook_get_nth_page( GTK_NOTEBOOK (impl->w_settings_notebook), - NM_OPENVPN_CONTYPE_SHAREDKEY)); - gtk_widget_set_sensitive( tab, FALSE); - gtk_widget_set_sensitive( GTK_WIDGET ( gtk_notebook_get_tab_label( GTK_NOTEBOOK (impl->w_settings_notebook), tab) ), FALSE); - - tab = GTK_WIDGET ( gtk_notebook_get_nth_page( GTK_NOTEBOOK (impl->w_settings_notebook), - NM_OPENVPN_CONTYPE_PASSWORD)); - gtk_widget_set_sensitive( tab, TRUE); - gtk_widget_set_sensitive( GTK_WIDGET ( gtk_notebook_get_tab_label( GTK_NOTEBOOK (impl->w_settings_notebook), tab) ), TRUE); - - } - gtk_notebook_set_current_page( impl->w_settings_notebook, NM_OPENVPN_CONTYPE_X509 ); - break; } } @@ -1133,6 +1231,15 @@ open_button_clicked (GtkButton *button, gpointer user_data) } else if ( button == impl->w_button_password_ca ) { msg = _("Select CA to use"); entry = impl->w_password_ca; + } else if ( button == impl->w_button_x509userpass_ca ) { + msg = _("Select CA to use"); + entry = impl->w_x509userpass_ca; + } else if ( button == impl->w_button_x509userpass_cert ) { + msg = _("Select certificate to use"); + entry = impl->w_x509userpass_cert; + } else if ( button == impl->w_button_x509userpass_key ) { + msg = _("Select key to use"); + entry = impl->w_x509userpass_key; } else if ( button == impl->w_button_ta ) { msg = _("Select TA to use"); entry = impl->w_ta; @@ -1183,21 +1290,22 @@ export_to_file (NetworkManagerVpnUIImpl *impl, const char *path, { FILE *f; GSList *i; - const char *connection_type = NULL; - const char *remote = NULL; - const char *dev = NULL; - const char *proto = NULL; - const char *ca = NULL; - const char *cert = NULL; - const char *key = NULL; - const char *lzo = NULL; - const char *shared_key = NULL; - const char *local_ip = NULL; - const char *remote_ip = NULL; - const char *username = NULL; - const char *cipher = NULL; - const char *ta = NULL; - const char *ta_dir = NULL; + const char *connection_type = ""; + const char *remote = ""; + const char *port = ""; + const char *dev = ""; + const char *proto = ""; + const char *ca = ""; + const char *cert = ""; + const char *key = ""; + const char *lzo = ""; + const char *shared_key = ""; + const char *local_ip = ""; + const char *remote_ip = ""; + const char *username = ""; + const char *cipher = ""; + const char *ta = ""; + const char *ta_dir = ""; char *routes_str = NULL; gboolean ret; @@ -1212,6 +1320,8 @@ export_to_file (NetworkManagerVpnUIImpl *impl, const char *path, if (strcmp (k, "remote") == 0) { remote = value; + } else if (strcmp (k, "port") == 0) { + port = value; } else if (strcmp (k, "dev") == 0) { dev = value; } else if (strcmp (k, "proto") == 0) { @@ -1247,7 +1357,7 @@ export_to_file (NetworkManagerVpnUIImpl *impl, const char *path, if (routes != NULL) { GString *str; - str = g_string_new ("routes="); + str = g_string_new (""); for (i = routes; i != NULL; i = g_slist_next (i)) { const char *route; @@ -1271,6 +1381,7 @@ export_to_file (NetworkManagerVpnUIImpl *impl, const char *path, "description=%s\n" "connection-type=%s\n" "remote=%s\n" + "port=%s\n" "dev=%s\n" "proto=%s\n" "ca=%s\n" @@ -1288,6 +1399,7 @@ export_to_file (NetworkManagerVpnUIImpl *impl, const char *path, /* Description */ connection_name, /* conn type */ connection_type, /* Host */ remote, + /* Port */ port, /* TUN or TAP */ dev, /* TCP or UDP */ proto, /* CA */ ca, @@ -1429,6 +1541,7 @@ impl_get_object (void) impl->w_connection_name = GTK_ENTRY (glade_xml_get_widget (impl->xml, "openvpn-connection-name")); impl->w_remote = GTK_ENTRY (glade_xml_get_widget (impl->xml, "openvpn-remote")); + impl->w_port = GTK_ENTRY (glade_xml_get_widget (impl->xml, "openvpn-port")); impl->w_use_routes = GTK_CHECK_BUTTON (glade_xml_get_widget (impl->xml, "openvpn-use-routes")); impl->w_routes = GTK_ENTRY (glade_xml_get_widget (impl->xml, "openvpn-routes")); impl->w_opt_info_expander = GTK_EXPANDER (glade_xml_get_widget (impl->xml, @@ -1460,6 +1573,15 @@ impl_get_object (void) impl->w_password_ca = GTK_ENTRY( glade_xml_get_widget( impl->xml, "openvpn-password-ca" ) ); impl->w_button_password_ca = GTK_BUTTON( glade_xml_get_widget( impl->xml, "openvpn-password-but-ca" ) ); + impl->w_x509userpass_ca = GTK_ENTRY( glade_xml_get_widget( impl->xml, "openvpn-x509userpass-ca" ) ); + impl->w_x509userpass_cert = GTK_ENTRY( glade_xml_get_widget( impl->xml, "openvpn-x509userpass-cert" ) ); + impl->w_x509userpass_key = GTK_ENTRY( glade_xml_get_widget( impl->xml, "openvpn-x509userpass-key" ) ); + impl->w_x509userpass_username = GTK_ENTRY( glade_xml_get_widget( impl->xml, "openvpn-x509userpass-username" ) ); + + impl->w_button_x509userpass_ca = GTK_BUTTON( glade_xml_get_widget( impl->xml, "openvpn-x509userpass-but-ca" ) ); + impl->w_button_x509userpass_cert = GTK_BUTTON( glade_xml_get_widget( impl->xml, "openvpn-x509userpass-but-cert" ) ); + impl->w_button_x509userpass_key = GTK_BUTTON( glade_xml_get_widget( impl->xml, "openvpn-x509userpass-but-key" ) ); + impl->w_use_cipher = GTK_CHECK_BUTTON (glade_xml_get_widget (impl->xml, "openvpn-use-cipher")); impl->w_cipher = GTK_COMBO_BOX( glade_xml_get_widget( impl->xml, "openvpn-cipher" ) ); populate_cipher(impl->w_cipher); @@ -1485,6 +1607,8 @@ impl_get_object (void) "changed", GTK_SIGNAL_FUNC (editable_changed), impl); gtk_signal_connect (GTK_OBJECT (impl->w_remote), "changed", GTK_SIGNAL_FUNC (editable_changed), impl); + gtk_signal_connect (GTK_OBJECT (impl->w_port), + "changed", GTK_SIGNAL_FUNC (editable_changed), impl); gtk_signal_connect (GTK_OBJECT (impl->w_routes), "changed", GTK_SIGNAL_FUNC (editable_changed), impl); gtk_signal_connect (GTK_OBJECT (impl->w_ca), @@ -1503,6 +1627,14 @@ impl_get_object (void) "changed", GTK_SIGNAL_FUNC (editable_changed), impl); gtk_signal_connect (GTK_OBJECT (impl->w_password_ca), "changed", GTK_SIGNAL_FUNC (editable_changed), impl); + gtk_signal_connect (GTK_OBJECT (impl->w_x509userpass_ca), + "changed", GTK_SIGNAL_FUNC (editable_changed), impl); + gtk_signal_connect (GTK_OBJECT (impl->w_x509userpass_cert), + "changed", GTK_SIGNAL_FUNC (editable_changed), impl); + gtk_signal_connect (GTK_OBJECT (impl->w_x509userpass_key), + "changed", GTK_SIGNAL_FUNC (editable_changed), impl); + gtk_signal_connect (GTK_OBJECT (impl->w_x509userpass_username), + "changed", GTK_SIGNAL_FUNC (editable_changed), impl); gtk_signal_connect (GTK_OBJECT (impl->w_ta), "changed", GTK_SIGNAL_FUNC (editable_changed), impl); @@ -1516,6 +1648,12 @@ impl_get_object (void) "clicked", GTK_SIGNAL_FUNC (open_button_clicked), impl); gtk_signal_connect (GTK_OBJECT (impl->w_button_password_ca), "clicked", GTK_SIGNAL_FUNC (open_button_clicked), impl); + gtk_signal_connect (GTK_OBJECT (impl->w_button_x509userpass_ca), + "clicked", GTK_SIGNAL_FUNC (open_button_clicked), impl); + gtk_signal_connect (GTK_OBJECT (impl->w_button_x509userpass_cert), + "clicked", GTK_SIGNAL_FUNC (open_button_clicked), impl); + gtk_signal_connect (GTK_OBJECT (impl->w_button_x509userpass_key), + "clicked", GTK_SIGNAL_FUNC (open_button_clicked), impl); gtk_signal_connect (GTK_OBJECT (impl->w_button_ta), "clicked", GTK_SIGNAL_FUNC (open_button_clicked), impl);