about summary refs log tree commit diff stats
path: root/src/command/cmd_defs.c
diff options
context:
space:
mode:
authorDebXWoody <stefan@debxwoody.de>2020-06-21 09:43:42 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-06-29 19:05:41 +0200
commit2c94ee5a88f64332a3f41f41a4d314fc52200e31 (patch)
tree6209fd4796609a7706f950b18a9bb652c6c137fb /src/command/cmd_defs.c
parent3afd854dc862696c4842b2ed93efcad44d617910 (diff)
downloadprofani-tty-2c94ee5a88f64332a3f41f41a4d314fc52200e31.tar.gz
Feature request - XEP-0373: OpenPGP for XMPP (OX)
Basic implementation of XEP-0373: OpenPGP for XMPP.
https://xmpp.org/extensions/xep-0373.html

Command /ox

Issue: #1331
Diffstat (limited to 'src/command/cmd_defs.c')
-rw-r--r--src/command/cmd_defs.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c
index 85140430..815fe9d8 100644
--- a/src/command/cmd_defs.c
+++ b/src/command/cmd_defs.c
@@ -1691,6 +1691,48 @@ static struct cmd_t command_defs[] =
             "/pgp char P")
     },
 
+// XEP-0373: OpenPGP for XMPP
+#ifdef HAVE_LIBGPGME
+    { "/ox",
+        parse_args, 1, 3, NULL,
+        CMD_NOSUBFUNCS
+        CMD_MAINFUNC(cmd_ox)
+        CMD_TAGS(
+            CMD_TAG_CHAT,
+            CMD_TAG_UI)
+        CMD_SYN(
+            "/ox keys",
+            "/ox contacts",
+            "/ox start [<contact>]",
+            "/ox end",
+            "/ox log on|off|redact",
+            "/ox char <char>",
+            "/ox sendfile on|off",
+            "/ox announce <file>",
+            "/ox discover",
+            "/ox request <jid>")
+        CMD_DESC(
+            "OpenPGP (OX) commands to manage keys, and perform PGP encryption during chat sessions. ")
+        CMD_ARGS(
+            { "keys",                     "List all keys known to the system." },
+            { "contacts",                 "Show contacts with assigned public keys." },
+            { "start [<contact>]",        "Start PGP encrypted chat, current contact will be used if not specified." },
+            { "end",                      "End PGP encrypted chat with the current recipient." },
+            { "log on|off",               "Enable or disable plaintext logging of PGP encrypted messages." },
+            { "log redact",               "Log PGP encrypted messages, but replace the contents with [redacted]. This is the default." },
+            { "char <char>",              "Set the character to be displayed next to PGP encrypted messages." },
+            { "announce <file>",          "Announce a public key by pushing it on the XMPP Server"},
+            { "discover <jid>",           "Discover public keys of a jid "},
+            { "request <jid>",            "Request public keys"},
+            { "sendfile on|off",          "Allow /sendfile to send unencrypted files while otherwise using PGP."})
+        CMD_EXAMPLES(
+            "/ox log off",
+            "/ox start odin@valhalla.edda",
+            "/ox end",
+            "/ox char X")
+    },
+#endif // HAVE_LIBGPGME
+
     { "/otr",
         parse_args, 1, 3, NULL,
         CMD_SUBFUNCS(