pkgsrc-Changes archive

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

CVS commit: pkgsrc/comms/srtp



Module Name:    pkgsrc
Committed By:   maya
Date:           Mon Sep 26 13:20:41 UTC 2016

Modified Files:
        pkgsrc/comms/srtp: distinfo
Added Files:
        pkgsrc/comms/srtp/patches: patch-crypto_hash_hmac.c
            patch-crypto_kernel_crypto__kernel.c

Log Message:
srtp: do not conflict with builtin hmac in netbsd-7.99.x, use another name
(local_hmac). Fixes build on NetBSD.

Patch by Sérgio de Almeida Lenzi


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/comms/srtp/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/comms/srtp/patches/patch-crypto_hash_hmac.c \
    pkgsrc/comms/srtp/patches/patch-crypto_kernel_crypto__kernel.c

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

Modified files:

Index: pkgsrc/comms/srtp/distinfo
diff -u pkgsrc/comms/srtp/distinfo:1.3 pkgsrc/comms/srtp/distinfo:1.4
--- pkgsrc/comms/srtp/distinfo:1.3      Tue Nov  3 01:34:57 2015
+++ pkgsrc/comms/srtp/distinfo  Mon Sep 26 13:20:41 2016
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2015/11/03 01:34:57 agc Exp $
+$NetBSD: distinfo,v 1.4 2016/09/26 13:20:41 maya Exp $
 
 SHA1 (srtp-1.4.4.tgz) = 299c6cfe0c9d6f1804bc5921cfbdb6a6bc76a521
 RMD160 (srtp-1.4.4.tgz) = 64e58a3fc2cc30a8d7cba6b6ce59f807649d9dee
@@ -8,6 +8,8 @@ SHA1 (patch-Makefile.in) = 8e0e6d7bed257
 SHA1 (patch-configure) = d70d01b5f846b2f163ba2246511cf1314005fa35
 SHA1 (patch-configure.in) = 217c066920fedaaba02d86e3c2017a368ea8fee7
 SHA1 (patch-crypto_cipher_aes__icm.c) = 7e402b790678bd6c27daf8f56bf0a1123b087d07
+SHA1 (patch-crypto_hash_hmac.c) = fe7dfb0b775169a649bf1f7c5c25d17e5e258cc8
+SHA1 (patch-crypto_kernel_crypto__kernel.c) = f529544b3355a05fdb70962bf44d8f8fa8a5a167
 SHA1 (patch-crypto_math_datatypes.c) = f5358856026b91ae40db4a7c38bae6138656d94e
 SHA1 (patch-crypto_math_gf2__8.c) = 4e878e3debc2c287dcbce6ab1127ba8cd22352c3
 SHA1 (patch-crypto_math_math.c) = 06961bd3184b0e47475f76a55d9669ce6d3a7149

Added files:

Index: pkgsrc/comms/srtp/patches/patch-crypto_hash_hmac.c
diff -u /dev/null pkgsrc/comms/srtp/patches/patch-crypto_hash_hmac.c:1.1
--- /dev/null   Mon Sep 26 13:20:41 2016
+++ pkgsrc/comms/srtp/patches/patch-crypto_hash_hmac.c  Mon Sep 26 13:20:41 2016
@@ -0,0 +1,58 @@
+$NetBSD: patch-crypto_hash_hmac.c,v 1.1 2016/09/26 13:20:41 maya Exp $
+
+avoid conflict with builtin hmac on netbsd 7.99.x
+
+--- crypto/hash/hmac.c.orig    2016-09-21 15:34:12.042157000 +0000
++++ 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 local_hmac;
+   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 = &local_hmac;
+   (*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++;
++  local_hmac.ref_count++;
+ 
+   return err_status_ok;
+ }
+ 
+ err_status_t
+ hmac_dealloc(auth_t *a) {
+-  extern auth_type_t hmac;
++  extern auth_type_t local_hmac;
+   
+   /* 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--;
++  local_hmac.ref_count--;
+ 
+   return err_status_ok;
+ }
+@@ -252,7 +252,7 @@ char hmac_description[] = "hmac sha-1 au
+  */
+ 
+ auth_type_t
+-hmac  = {
++local_hmac  = {
+   (auth_alloc_func)      hmac_alloc,
+   (auth_dealloc_func)    hmac_dealloc,
+   (auth_init_func)       hmac_init,
Index: pkgsrc/comms/srtp/patches/patch-crypto_kernel_crypto__kernel.c
diff -u /dev/null pkgsrc/comms/srtp/patches/patch-crypto_kernel_crypto__kernel.c:1.1
--- /dev/null   Mon Sep 26 13:20:41 2016
+++ pkgsrc/comms/srtp/patches/patch-crypto_kernel_crypto__kernel.c      Mon Sep 26 13:20:41 2016
@@ -0,0 +1,24 @@
+$NetBSD: patch-crypto_kernel_crypto__kernel.c,v 1.1 2016/09/26 13:20:41 maya Exp $
+
+avoid conflict with builtin hmac on netbsd-7.99.x
+
+--- crypto/kernel/crypto_kernel.c.orig 2016-09-21 15:54:48.158697000 +0000
++++ 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 local_hmac;
+ 
+ /* 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(&local_hmac, HMAC_SHA1);
+   if (status)
+     return status;
+ 



Home | Main Index | Thread Index | Old Index