[network-manager-applet/rm-userset] agent: 802.1x private key data is no longer secret
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/rm-userset] agent: 802.1x private key data is no longer secret
- Date: Wed, 2 Feb 2011 23:25:39 +0000 (UTC)
commit b2a74119d0d68ec160f58388ea8d8e170430f300
Author: Dan Williams <dcbw redhat com>
Date: Tue Feb 1 12:53:44 2011 -0600
agent: 802.1x private key data is no longer secret
The data isn't, because it should already be encrypted with a password,
which *is* secret.
PSA: don't use unencrypted private keys. Really. Just Don't.
src/applet-agent.c | 29 ++---------------------------
1 files changed, 2 insertions(+), 27 deletions(-)
---
diff --git a/src/applet-agent.c b/src/applet-agent.c
index 9d9c28c..b7425de 100644
--- a/src/applet-agent.c
+++ b/src/applet-agent.c
@@ -56,30 +56,6 @@ static guint signals[LAST_SIGNAL] = { 0 };
/*******************************************************/
-static const char *applet_8021x_cert_keys[] = {
- "ca-cert",
- "client-cert",
- "private-key",
- "phase2-ca-cert",
- "phase2-client-cert",
- "phase2-private-key",
- NULL
-};
-
-static gboolean
-string_in_list (const char *str, const char **valid_strings)
-{
- int i;
-
- for (i = 0; valid_strings[i]; i++) {
- if (!g_strcmp0 (str, valid_strings[i]))
- return TRUE;
- }
- return FALSE;
-}
-
-/*******************************************************/
-
#define DBUS_TYPE_G_MAP_OF_STRING (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING))
typedef struct {
@@ -527,9 +503,8 @@ write_one_secret_to_keyring (NMSetting *setting,
KeyringCall *call;
NMSettingSecretFlags secret_flags = NM_SETTING_SECRET_FLAG_SYSTEM_OWNED;
- /* non-secrets and private key paths don't get stored in the keyring */
- if ( !(flags & NM_SETTING_PARAM_SECRET)
- || (NM_IS_SETTING_802_1X (setting) && string_in_list (key, applet_8021x_cert_keys)))
+ /* Non-secrets obviously don't get saved in the keyring */
+ if (!(flags & NM_SETTING_PARAM_SECRET))
return;
/* Don't system-owned or always-ask secrets */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]