From 903a2fcc60f82f52fe05c79250e6875dc48f23f0 Mon Sep 17 00:00:00 2001 From: Sven Moritz Hallberg Date: Sat, 16 Feb 2008 17:24:38 +0100 Subject: remove (broken) 'otr forget key' command again --- doc/user-guide/commands.xml | 15 +-------------- otr.c | 31 ------------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml index 8c2a30ca..2d6b866d 100644 --- a/doc/user-guide/commands.xml +++ b/doc/user-guide/commands.xml @@ -345,7 +345,7 @@ - Forgets some part of our OTR userstate. Available things: fingerprint, context, and key. See help otr forget <thing> for more information. + Forgets some part of our OTR userstate. Available things: fingerprint and context. See help otr forget <thing> for more information. @@ -376,19 +376,6 @@ - - otr forget key <fingerprint> - - - - - Forgets an OTR private key matching the specified fingerprint. It is allowed to specify only a (unique) prefix of the fingerprint. - - - - - - diff --git a/otr.c b/otr.c index 460dcda0..78fc688f 100644 --- a/otr.c +++ b/otr.c @@ -126,7 +126,6 @@ void myfgets(char *s, int size, FILE *stream); void yes_keygen(gpointer w, void *data); void yes_forget_fingerprint(gpointer w, void *data); void yes_forget_context(gpointer w, void *data); -void yes_forget_key(gpointer w, void *data); /* helper to make sure accountname and protocol match the incoming "opdata" */ struct im_connection *check_imc(void *opdata, const char *accountname, @@ -898,15 +897,6 @@ void yes_forget_context(gpointer w, void *data) otrl_context_forget(ctx); } -void yes_forget_key(gpointer w, void *data) -{ - OtrlPrivKey *key = (OtrlPrivKey *)data; - - /* FIXME: For some reason which /completely eludes me/, this call keeps - barfing on the gcry_sexp_release inside (invalid pointer free). */ - otrl_privkey_forget(key); -} - void cmd_otr_forget(irc_t *irc, char **args) { if(!strcmp(args[1], "fingerprint")) @@ -981,27 +971,6 @@ void cmd_otr_forget(irc_t *irc, char **args) query_add(irc, NULL, s, yes_forget_context, NULL, ctx); } - else if(!strcmp(args[1], "key")) - { - OtrlPrivKey *key; - char *s; - - key = match_privkey(irc, ((const char **)args)+2); - if(!key) { - /* match_privkey does error messages */ - return; - } - - /* TODO: Find out why 'otr forget key' barfs (cf. yes_forget_key) */ - irc_usermsg(irc, "otr %s %s: not implemented, please edit \x02%s%s.otr_keys\x02 manually :-/", - args[0], args[1], global.conf->configdir, irc->nick); - return; - - s = g_strdup_printf("about to forget the private key for %s/%s, are you sure?", - key->accountname, key->protocol); - query_add(irc, NULL, s, yes_forget_key, NULL, key); - } - else { irc_usermsg(irc, "otr %s: unknown subcommand \"%s\", see \x02help otr forget\x02", -- cgit v1.2.3