[pkg-otr-team] [irssi-plugin-otr] 69/167: ifdef'd-out test stub for extra symkey support

Holger Levsen holger at moszumanska.debian.org
Mon Mar 3 21:55:33 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to tag 4.0.0
in repository irssi-plugin-otr.

commit 4b7e5911511e7e2819888f4d5a516c23fd24c40b
Author: cypherpunk <cypherpunk>
Date:   Wed Jul 2 18:33:09 2008 +0000

    ifdef'd-out test stub for extra symkey support
---
 otr-plugin.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/otr-plugin.c b/otr-plugin.c
index f901b50..219400d 100644
--- a/otr-plugin.c
+++ b/otr-plugin.c
@@ -337,6 +337,25 @@ static void handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
     }   
 }
 
+#ifdef DUMP_RECEIVED_SYMKEY
+static void dump_data(const unsigned char *d, size_t l)
+{
+    size_t i;
+    for (i=0;i<l;++i) printf("%02x", d[i]);
+}
+
+static void received_symkey_cb(void *opdata, ConnContext *context,
+	unsigned int use, const unsigned  char *usedata,
+	size_t usedatalen, const unsigned char *symkey)
+{
+    printf("Received symkey use: %08x\nKey: ", use);
+    dump_data(symkey, OTRL_EXTRAKEY_BYTES);
+    printf("\nUsedata: ");
+    dump_data(usedata, usedatalen);
+    printf("\n\n");
+}
+#endif
+
 static OtrlMessageAppOps ui_ops = {
     policy_cb,
     create_privkey_cb,
@@ -356,7 +375,11 @@ static OtrlMessageAppOps ui_ops = {
     max_message_size_cb,
     NULL,                   /* account_name */
     NULL,                   /* account_name_free */
+#ifdef DUMP_RECEIVED_SYMKEY
+    received_symkey_cb,
+#else
     NULL,		    /* received_symkey */
+#endif
     handle_smp_event
 };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-otr/packages/irssi-plugin-otr.git



More information about the Pkg-otr-team mailing list