diff options
author | Stef Walter <stefw@collabora.co.uk> | 2010-11-19 19:27:23 +0000 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2010-11-19 19:27:23 +0000 |
commit | 3245a5efe64911f39e3f7f9966c858e650c8045c (patch) | |
tree | bd75cd7a33043a10bf801d3754be5ca55d1887e3 /tool | |
parent | f52fe414b7c6c2de7ed07654b6dcd1355e5a77b1 (diff) | |
download | gnome-keyring-3245a5efe64911f39e3f7f9966c858e650c8045c.tar.gz |
Disable trust usage in tool until we work trust assertions out better.
Diffstat (limited to 'tool')
-rw-r--r-- | tool/gkr-tool-trust.c | 38 | ||||
-rw-r--r-- | tool/gkr-tool.c | 2 |
2 files changed, 20 insertions, 20 deletions
diff --git a/tool/gkr-tool-trust.c b/tool/gkr-tool-trust.c index a2184e69..edd0b2cd 100644 --- a/tool/gkr-tool-trust.c +++ b/tool/gkr-tool-trust.c @@ -35,28 +35,21 @@ static gchar **trust_files = NULL; #endif +#if 0 struct { const gchar *name; - GcrPurpose purpose; + const gchar *purpose; } purpose_names[] = { { "server", GCR_PURPOSE_SERVER_AUTH }, { "client", GCR_PURPOSE_CLIENT_AUTH }, { "code", GCR_PURPOSE_CODE_SIGNING }, { "email", GCR_PURPOSE_EMAIL }, - { "timestamp", GCR_PURPOSE_TIME_STAMPING }, - { "ipsec-endpoint", GCR_PURPOSE_IPSEC_ENDPOINT }, - { "ipsec-tunnel", GCR_PURPOSE_IPSEC_TUNNEL }, - { "ipsec-user", GCR_PURPOSE_IPSEC_USER }, - { "ipsec-ike-intermediate", GCR_PURPOSE_IKE_INTERMEDIATE }, }; -struct { - const gchar *name; - GcrPurpose trust; -} trust_names[] = { - { "trusted", GCR_TRUST_TRUSTED }, - { "untrusted", GCR_TRUST_UNTRUSTED }, - { "unknown", GCR_TRUST_UNKNOWN }, +enum { + MODE_SHOW = 0, + MODE_ADD = 1, + MODE_REMOVE = 2 }; static gboolean @@ -156,25 +149,31 @@ set_certificate_exception (GcrCertificate *certificate, GcrPurpose purpose, GcrT return 0; } -static gchar *set_trust = NULL; +static gchar *add_trust = NULL; +static gchar *remove_trust = NULL; static GOptionEntry trust_entries[] = { GKR_TOOL_BASIC_OPTIONS - { "set", 0, 0, G_OPTION_ARG_STRING, &set_trust, "Set trust exception", "trust" }, + { "add", 0, 0, G_OPTION_ARG_STRING, &set_trust, "Add certificate trust exception", "purpose" }, + { "remove", 0, 0, G_OPTION_ARG_STRING, &set_trust, "Remove certificate trust exception", "purpose" }, { NULL } }; +#endif int gkr_tool_trust (int argc, char *argv[]) { + g_assert_not_reached (); + return 1; +#if 0 GcrCertificate *certificate = NULL; - GcrPurpose purpose; + const gchar *purpose; GError *error = NULL; GArray *purposes = NULL; GFile *file = NULL; gchar *contents; gsize length; - GcrTrust trust; + TrustMode mode; int ret = 2; guint i; @@ -217,9 +216,9 @@ gkr_tool_trust (int argc, char *argv[]) for (i = 0; i < purposes->len; ++i) { purpose = g_array_index (purposes, GcrPurpose, i); if (set_trust) - ret = set_certificate_exception (certificate, purpose, trust); + ret = add_certificate_exception (certificate, purpose, trust); else - ret = get_certificate_exception (certificate, purpose); + ret = is_certificate_exception (certificate, purpose); if (ret != 0) break; } @@ -233,4 +232,5 @@ done: g_object_unref (certificate); g_free (set_trust); return ret; +#endif } diff --git a/tool/gkr-tool.c b/tool/gkr-tool.c index e19b6792..e5db5739 100644 --- a/tool/gkr-tool.c +++ b/tool/gkr-tool.c @@ -88,7 +88,7 @@ typedef struct _CommandInfo { static CommandInfo command_info[] = { { "import", gkr_tool_import }, - { "trust-exception", gkr_tool_trust }, + { "certificate-exception", gkr_tool_trust }, { NULL, NULL } }; |