diff options
author | James Booth <boothj5@gmail.com> | 2015-09-24 01:06:53 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-09-24 01:06:53 +0100 |
commit | bd421853897b432a2877da549eb7dbc4a67503e3 (patch) | |
tree | 2eadef99ee2223c6ee56c42c8592046aa24d7efa /src/command/command.c | |
parent | 8d2c7f1ac0b5e772310b1bb7f324a91bbf8b3805 (diff) | |
download | profani-tty-bd421853897b432a2877da549eb7dbc4a67503e3.tar.gz |
Added /tls revoke
Diffstat (limited to 'src/command/command.c')
-rw-r--r-- | src/command/command.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/command/command.c b/src/command/command.c index bb440bbf..f2883efc 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -50,6 +50,7 @@ #include "config/accounts.h" #include "config/preferences.h" #include "config/theme.h" +#include "config/tlscerts.h" #include "contact.h" #include "roster_list.h" #include "jid.h" @@ -196,6 +197,7 @@ static struct cmd_t command_defs[] = "/tls always", "/tls deny", "/tls trusted", + "/tls revoke <fingerprint>", "/tls certpath", "/tls certpath set <path>", "/tls certpath clear") @@ -205,7 +207,8 @@ static struct cmd_t command_defs[] = { "allow", "Allow connection to continue with an invalid TLS certificate." }, { "always", "Always allow connections with this invalid TLS certificate." }, { "deny", "Terminate TLS connection." }, - { "trusted", "List manually trusted certificates." }, + { "trusted", "List manually trusted certificates (with /tls always)." }, + { "revoke", "Remove a manually trusted certificate." }, { "certpath", "Show the trusted certificate path." }, { "certpath set <path>", "Specify filesystem path containing trusted certificates." }, { "certpath clear", "Clear the trusted certificate path." }) @@ -2103,6 +2106,7 @@ cmd_init(void) autocomplete_add(tls_ac, "always"); autocomplete_add(tls_ac, "deny"); autocomplete_add(tls_ac, "trusted"); + autocomplete_add(tls_ac, "revoke"); autocomplete_add(tls_ac, "certpath"); tls_certpath_ac = autocomplete_new(); @@ -2286,6 +2290,7 @@ cmd_reset_autocomplete(ProfWin *window) muc_invites_reset_ac(); accounts_reset_all_search(); accounts_reset_enabled_search(); + tlscerts_reset_ac(); prefs_reset_boolean_choice(); presence_reset_sub_request_search(); #ifdef HAVE_LIBGPGME @@ -3521,6 +3526,11 @@ _tls_autocomplete(ProfWin *window, const char * const input) { char *result = NULL; + result = autocomplete_param_with_func(input, "/tls revoke", tlscerts_complete); + if (result) { + return result; + } + result = autocomplete_param_with_ac(input, "/tls certpath", tls_certpath_ac, TRUE); if (result) { return result; |