pkgsrc-WIP-changes archive

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

firefox-webrtc: Backport webrtc patches from pkgsrc



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Oct 30 23:48:46 2016 +0100
Changeset:	c5ff3c913a59e5d9c09d4ac810f9a282cd5ff987

Modified Files:
	firefox-webrtc/distinfo
Added Files:
	firefox-webrtc/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c
	firefox-webrtc/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c

Log Message:
firefox-webrtc: Backport webrtc patches from pkgsrc

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c5ff3c913a59e5d9c09d4ac810f9a282cd5ff987

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 firefox-webrtc/distinfo                            |  2 +
 .../patch-netwerk_srtp_src_crypto_hash_hmac.c      | 63 ++++++++++++++++++++++
 ...netwerk_srtp_src_crypto_kernel_crypto__kernel.c | 24 +++++++++
 3 files changed, 89 insertions(+)

diffs:
diff --git a/firefox-webrtc/distinfo b/firefox-webrtc/distinfo
index 53415af..77155ce 100644
--- a/firefox-webrtc/distinfo
+++ b/firefox-webrtc/distinfo
@@ -80,6 +80,8 @@ SHA1 (patch-modules_libjar_nsZipArchive.cpp) = 133b1658839d9b0f932a601670862c1f4
 SHA1 (patch-modules_libpref_init_all.js) = 3bc5962fdabb5aecb72ffc7e73bb56392d1ea717
 SHA1 (patch-mozglue_build_arm.cpp) = f41ace63b3f1d2a8ccaffc98c3c64d1e22af5249
 SHA1 (patch-mozglue_build_arm.h) = 5e272f4e19b9681d43a63c45d78b0e44a392c7dc
+SHA1 (patch-netwerk_srtp_src_crypto_hash_hmac.c) = 852abd95ca0a553bbe1b65da2fa4006fd205d588
+SHA1 (patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c) = a589bff3b76e79b54f5e617020b137ff3d7f816b
 SHA1 (patch-python_mozbuild_mozbuild_configure_options.py) = f862ee425ae016df6fe12b55050a8dc075ecce89
 SHA1 (patch-rc) = 9628b038f036f3fc0e37bdf84fa0abf99dbc8d2a
 SHA1 (patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h) = 5ffb0782bbbff2fd17ad71e98b349b4ec3dc6c8c
diff --git a/firefox-webrtc/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c b/firefox-webrtc/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c
new file mode 100644
index 0000000..cb8e375
--- /dev/null
+++ b/firefox-webrtc/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c
@@ -0,0 +1,63 @@
+$NetBSD: patch-netwerk_srtp_src_crypto_hash_hmac.c,v 1.2 2016/10/30 01:10:10 kamil Exp $
+
+Fix conflicting hmac symbol name with <stdlib.h> on NetBSD.
+
+--- netwerk/srtp/src/crypto/hash/hmac.c.orig	2016-05-12 17:13:29.000000000 +0000
++++ netwerk/srtp/src/crypto/hash/hmac.c
+@@ -55,7 +55,7 @@ debug_module_t mod_hmac = {
+ 
+ err_status_t
+ hmac_alloc(auth_t **a, int key_len, int out_len) {
+-  extern auth_type_t hmac;
++  extern auth_type_t ffhmac;
+   uint8_t *pointer;
+ 
+   debug_print(mod_hmac, "allocating auth func with key length %d", key_len);
+@@ -79,21 +79,21 @@ hmac_alloc(auth_t **a, int key_len, int 
+ 
+   /* set pointers */
+   *a = (auth_t *)pointer;
+-  (*a)->type = &hmac;
++  (*a)->type = &ffhmac;
+   (*a)->state = pointer + sizeof(auth_t);  
+   (*a)->out_len = out_len;
+   (*a)->key_len = key_len;
+   (*a)->prefix_len = 0;
+ 
+   /* increment global count of all hmac uses */
+-  hmac.ref_count++;
++  ffhmac.ref_count++;
+ 
+   return err_status_ok;
+ }
+ 
+ err_status_t
+ hmac_dealloc(auth_t *a) {
+-  extern auth_type_t hmac;
++  extern auth_type_t ffhmac;
+   
+   /* zeroize entire state*/
+   octet_string_set_to_zero((uint8_t *)a, 
+@@ -103,7 +103,7 @@ hmac_dealloc(auth_t *a) {
+   crypto_free(a);
+   
+   /* decrement global count of all hmac uses */
+-  hmac.ref_count--;
++  ffhmac.ref_count--;
+ 
+   return err_status_ok;
+ }
+@@ -252,7 +252,7 @@ char hmac_description[] = "hmac sha-1 au
+  */
+ 
+ auth_type_t
+-hmac  = {
++ffhmac  = {
+   (auth_alloc_func)      hmac_alloc,
+   (auth_dealloc_func)    hmac_dealloc,
+   (auth_init_func)       hmac_init,
+@@ -265,4 +265,3 @@ hmac  = {
+   (debug_module_t *)    &mod_hmac,
+   (auth_type_id_t)       HMAC_SHA1
+ };
+-
diff --git a/firefox-webrtc/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c b/firefox-webrtc/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c
new file mode 100644
index 0000000..b674527
--- /dev/null
+++ b/firefox-webrtc/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c,v 1.1 2016/10/30 01:06:26 kamil Exp $
+
+Fix conflicting hmac symbol name with <stdlib.h> on NetBSD.
+
+--- netwerk/srtp/src/crypto/kernel/crypto_kernel.c.orig	2016-05-12 17:13:29.000000000 +0000
++++ netwerk/srtp/src/crypto/kernel/crypto_kernel.c
+@@ -77,7 +77,7 @@ extern cipher_type_t aes_cbc;
+  */
+ 
+ extern auth_type_t null_auth;
+-extern auth_type_t hmac;
++extern auth_type_t ffhmac;
+ 
+ /* crypto_kernel is a global variable, the only one of its datatype */
+ 
+@@ -162,7 +162,7 @@ crypto_kernel_init() {
+   status = crypto_kernel_load_auth_type(&null_auth, NULL_AUTH);
+   if (status)
+     return status;
+-  status = crypto_kernel_load_auth_type(&hmac, HMAC_SHA1);
++  status = crypto_kernel_load_auth_type(&ffhmac, HMAC_SHA1);
+   if (status)
+     return status;
+ 


Home | Main Index | Thread Index | Old Index