pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/chat/libpurple Fix conflict with NetBSD's hmac(3) func...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/699b25d46352
branches:  trunk
changeset: 349379:699b25d46352
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Wed Jul 06 05:57:51 2016 +0000

description:
Fix conflict with NetBSD's hmac(3) function.

Makes this build again on NetBSD-7.99.33.

diffstat:

 chat/libpurple/distinfo                                               |   3 +-
 chat/libpurple/patches/patch-libpurple_protocols_jabber_auth__scram.c |  38 ++++++++++
 2 files changed, 40 insertions(+), 1 deletions(-)

diffs (57 lines):

diff -r 9cd92b718f59 -r 699b25d46352 chat/libpurple/distinfo
--- a/chat/libpurple/distinfo   Tue Jul 05 23:57:03 2016 +0000
+++ b/chat/libpurple/distinfo   Wed Jul 06 05:57:51 2016 +0000
@@ -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 @@
 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 -r 9cd92b718f59 -r 699b25d46352 chat/libpurple/patches/patch-libpurple_protocols_jabber_auth__scram.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/libpurple/patches/patch-libpurple_protocols_jabber_auth__scram.c     Wed Jul 06 05:57:51 2016 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index