summaryrefslogtreecommitdiff
path: root/chat
diff options
context:
space:
mode:
authorwiz <wiz>2016-07-06 05:57:51 +0000
committerwiz <wiz>2016-07-06 05:57:51 +0000
commit4f69105f0e87b2d9c5df146e1d598203fbc8a44f (patch)
tree364d4406ef3121f16683f7a2eecabe1beb74ac9d /chat
parent59935cde9ef9c48438b22cb202f0dd5bd64a2f65 (diff)
downloadpkgsrc-4f69105f0e87b2d9c5df146e1d598203fbc8a44f.tar.gz
Fix conflict with NetBSD's hmac(3) function.
Makes this build again on NetBSD-7.99.33.
Diffstat (limited to 'chat')
-rw-r--r--chat/libpurple/distinfo3
-rw-r--r--chat/libpurple/patches/patch-libpurple_protocols_jabber_auth__scram.c38
2 files changed, 40 insertions, 1 deletions
diff --git a/chat/libpurple/distinfo b/chat/libpurple/distinfo
index db79be50e8c..3cd2201d34a 100644
--- a/chat/libpurple/distinfo
+++ b/chat/libpurple/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.44 2016/01/13 22:25:38 wiz Exp $
+$NetBSD: distinfo,v 1.45 2016/07/06 05:57:51 wiz Exp $
SHA1 (pidgin-2.10.12.tar.bz2) = 4550a447f35b869554c2d7d7bc1c7d84a01ce238
RMD160 (pidgin-2.10.12.tar.bz2) = 22b14ba35cef488cb25d89b59aeb6c9923a4d924
@@ -6,4 +6,5 @@ SHA512 (pidgin-2.10.12.tar.bz2) = 4756bed3ae78b48bfeaa586def3c7a0014db76ce14ae8c
Size (pidgin-2.10.12.tar.bz2) = 9837598 bytes
SHA1 (patch-configure) = 74d033d148d74d0233c7ad33411b9ebcfbab7851
SHA1 (patch-libpurple_plugins_perl_common_Makefile.PL.in) = 40326826000ed42e7570486f89f3196b58093d48
+SHA1 (patch-libpurple_protocols_jabber_auth__scram.c) = 26384081c1065a26185019d715a007653b496e1e
SHA1 (patch-libpurple_protocols_mxit_profile.c) = e14883061131da2a3d31479584c5b267e451b721
diff --git a/chat/libpurple/patches/patch-libpurple_protocols_jabber_auth__scram.c b/chat/libpurple/patches/patch-libpurple_protocols_jabber_auth__scram.c
new file mode 100644
index 00000000000..42e876c2902
--- /dev/null
+++ b/chat/libpurple/patches/patch-libpurple_protocols_jabber_auth__scram.c
@@ -0,0 +1,38 @@
+$NetBSD: patch-libpurple_protocols_jabber_auth__scram.c,v 1.1 2016/07/06 05:57:51 wiz Exp $
+
+Fix conflict with NetBSD's hmac(3) function.
+
+--- libpurple/protocols/jabber/auth_scram.c.orig 2015-12-31 23:19:40.000000000 +0000
++++ libpurple/protocols/jabber/auth_scram.c
+@@ -134,7 +134,7 @@ guchar *jabber_scram_hi(const JabberScra
+ * Needless to say, these are fragile.
+ */
+ static void
+-hmac(const JabberScramHash *hash, guchar *out, const guchar *key, const gchar *str)
++purple_hmac(const JabberScramHash *hash, guchar *out, const guchar *key, const gchar *str)
+ {
+ PurpleCipherContext *context;
+
+@@ -187,18 +187,18 @@ jabber_scram_calc_proofs(JabberScramData
+ return FALSE;
+
+ /* client_key = HMAC(salted_password, "Client Key") */
+- hmac(data->hash, client_key, salted_password, "Client Key");
++ purple_hmac(data->hash, client_key, salted_password, "Client Key");
+ /* server_key = HMAC(salted_password, "Server Key") */
+- hmac(data->hash, server_key, salted_password, "Server Key");
++ purple_hmac(data->hash, server_key, salted_password, "Server Key");
+ g_free(salted_password);
+
+ /* stored_key = HASH(client_key) */
+ hash(data->hash, stored_key, client_key);
+
+ /* client_signature = HMAC(stored_key, auth_message) */
+- hmac(data->hash, client_signature, stored_key, data->auth_message->str);
++ purple_hmac(data->hash, client_signature, stored_key, data->auth_message->str);
+ /* server_signature = HMAC(server_key, auth_message) */
+- hmac(data->hash, (guchar *)data->server_signature->str, server_key, data->auth_message->str);
++ purple_hmac(data->hash, (guchar *)data->server_signature->str, server_key, data->auth_message->str);
+
+ /* client_proof = client_key XOR client_signature */
+ for (i = 0; i < hash_len; ++i)