[Pkg-privacy-commits] [pidgin-otr] 69/255: ifdef'd-out test stub for extra symkey support
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:51:24 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch experimental
in repository pidgin-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-privacy/packages/pidgin-otr.git
More information about the Pkg-privacy-commits
mailing list