[network-manager-openvpn] properties: show special cipher "none"
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn] properties: show special cipher "none"
- Date: Mon, 14 Sep 2015 12:03:07 +0000 (UTC)
commit be63c404a146704e3e4840f050d5bdd63bc94826
Author: Thomas Haller <thaller redhat com>
Date: Mon Sep 14 13:58:30 2015 +0200
properties: show special cipher "none"
We show all ciphers reported by `openvpn --show-ciphers`. However,
this does not show the special cipher "none" although it is a valid
configuration.
properties/auth-helpers.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 0e019b4..e28d72f 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -1028,6 +1028,15 @@ populate_cipher_combo (GtkComboBox *box, const char *user_cipher)
TLS_CIPHER_COL_NAME, _("Default"),
TLS_CIPHER_COL_DEFAULT, TRUE, -1);
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ TLS_CIPHER_COL_NAME, "none",
+ TLS_CIPHER_COL_DEFAULT, FALSE, -1);
+ if (g_strcmp0 (user_cipher, "none") == 0) {
+ gtk_combo_box_set_active_iter (box, &iter);
+ user_added = TRUE;
+ }
+
items = g_strsplit (tmp, "\n", 0);
g_free (tmp);
@@ -1044,12 +1053,15 @@ populate_cipher_combo (GtkComboBox *box, const char *user_cipher)
if (space)
*space = '\0';
+ if (strcmp (*item, "none") == 0)
+ continue;
+
if (strlen (*item)) {
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
TLS_CIPHER_COL_NAME, *item,
TLS_CIPHER_COL_DEFAULT, FALSE, -1);
- if (user_cipher && !strcmp (*item, user_cipher)) {
+ if (!user_added && user_cipher && !strcmp (*item, user_cipher)) {
gtk_combo_box_set_active_iter (box, &iter);
user_added = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]