diff options
author | adam <adam@pkgsrc.org> | 2020-05-05 17:54:39 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2020-05-05 17:54:39 +0000 |
commit | b98118840626c0722109ac7ec9a12e434d37b6d9 (patch) | |
tree | 47a139b1487a7b189e9f6b19b0c09d04795d9348 /comms | |
parent | 4c11b79257e2231a451c777143eee22572b79e39 (diff) | |
download | pkgsrc-b98118840626c0722109ac7ec9a12e434d37b6d9.tar.gz |
srtp: updated to 2.3.0
libsrtp 2.3.0
Major changes in this release are a fuzzer for libsrtp, NSS as optional crypto back end and cmake support for building. For more details and a complete list of changes please see the CHANGES file.
libsrtp 2.2.0
First release in the 2.2 series.
The major change with this release is that the all the code has been reformatted to be consistent and this consistency can be enforced with the include .clang-format file. This resulted in a lot of none functional changes but was considered worth it to simplify maintenance in the future. There are numerous other minor fixes, see the CHANGES file for more details.
libsrtp 2.1.0
First release in the 2.1 series.
libsrtp 2.0.0
Initial libsrtp 2.0 release.
Diffstat (limited to 'comms')
-rw-r--r-- | comms/srtp/Makefile | 30 | ||||
-rw-r--r-- | comms/srtp/PLIST | 46 | ||||
-rw-r--r-- | comms/srtp/buildlink3.mk | 5 | ||||
-rw-r--r-- | comms/srtp/distinfo | 23 | ||||
-rw-r--r-- | comms/srtp/patches/patch-CMakeLists.txt | 39 | ||||
-rw-r--r-- | comms/srtp/patches/patch-Makefile.in | 106 | ||||
-rw-r--r-- | comms/srtp/patches/patch-configure | 27 | ||||
-rw-r--r-- | comms/srtp/patches/patch-configure.in | 26 | ||||
-rw-r--r-- | comms/srtp/patches/patch-crypto_cipher_aes__icm.c | 22 | ||||
-rw-r--r-- | comms/srtp/patches/patch-crypto_hash_hmac.c | 58 | ||||
-rw-r--r-- | comms/srtp/patches/patch-crypto_kernel_crypto__kernel.c | 24 | ||||
-rw-r--r-- | comms/srtp/patches/patch-crypto_math_datatypes.c | 13 | ||||
-rw-r--r-- | comms/srtp/patches/patch-crypto_math_gf2__8.c | 13 | ||||
-rw-r--r-- | comms/srtp/patches/patch-crypto_math_math.c | 47 | ||||
-rw-r--r-- | comms/srtp/patches/patch-include_srtp.h | 21 | ||||
-rw-r--r-- | comms/srtp/patches/patch-srtp_srtp.c | 19 | ||||
-rw-r--r-- | comms/srtp/patches/patch-test_rtpw__test.sh | 13 |
17 files changed, 75 insertions, 457 deletions
diff --git a/comms/srtp/Makefile b/comms/srtp/Makefile index 64f3bb86bff..ef8163ced91 100644 --- a/comms/srtp/Makefile +++ b/comms/srtp/Makefile @@ -1,21 +1,25 @@ -# $NetBSD: Makefile,v 1.3 2020/01/26 05:26:18 rillig Exp $ +# $NetBSD: Makefile,v 1.4 2020/05/05 17:54:39 adam Exp $ -DISTNAME= srtp-1.4.4 -CATEGORIES= comms security -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=srtp/} -EXTRACT_SUFX= .tgz +DISTNAME= srtp-2.3.0 +CATEGORIES= comms security +MASTER_SITES= ${MASTER_SITE_GITHUB:=cisco/} +GITHUB_PROJECT= libsrtp +GITHUB_TAG= v${PKGVERSION_NOREV} -MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= http://srtp.sourceforge.net/ -COMMENT= Secure Real-time Transport Protocol library +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://github.com/cisco/libsrtp +COMMENT= Secure Real-time Transport Protocol library +LICENSE= modified-bsd +USE_CMAKE= yes USE_TOOLS+= gmake -USE_LIBTOOL= yes -GNU_CONFIGURE= yes +PKGCONFIG_OVERRIDE= libsrtp2.pc.in +TEST_TARGET= test -LDFLAGS.SunOS+= -lsocket -lnsl -TEST_TARGET= runtest +CMAKE_ARGS+= -DBUILD_SHARED_LIBS=ON +CMAKE_ARGS+= -DENABLE_OPENSSL=ON -WRKSRC= ${WRKDIR}/srtp +LDFLAGS.SunOS+= -lsocket -lnsl +.include "../../security/openssl/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/comms/srtp/PLIST b/comms/srtp/PLIST index 5d28a1ece21..349c6d63353 100644 --- a/comms/srtp/PLIST +++ b/comms/srtp/PLIST @@ -1,36 +1,10 @@ -@comment $NetBSD: PLIST,v 1.2 2018/01/01 22:29:21 rillig Exp $ -include/srtp/aes.h -include/srtp/aes_cbc.h -include/srtp/aes_icm.h -include/srtp/alloc.h -include/srtp/auth.h -include/srtp/cipher.h -include/srtp/config.h -include/srtp/crypto.h -include/srtp/crypto_kernel.h -include/srtp/crypto_math.h -include/srtp/crypto_types.h -include/srtp/cryptoalg.h -include/srtp/datatypes.h -include/srtp/err.h -include/srtp/getopt_s.h -include/srtp/gf2_8.h -include/srtp/hmac.h -include/srtp/integers.h -include/srtp/kernel_compat.h -include/srtp/key.h -include/srtp/null_auth.h -include/srtp/null_cipher.h -include/srtp/prng.h -include/srtp/rand_source.h -include/srtp/rdb.h -include/srtp/rdbx.h -include/srtp/rtp.h -include/srtp/rtp_priv.h -include/srtp/sha1.h -include/srtp/srtp.h -include/srtp/srtp_priv.h -include/srtp/stat.h -include/srtp/ut_sim.h -include/srtp/xfm.h -lib/libsrtp.la +@comment $NetBSD: PLIST,v 1.3 2020/05/05 17:54:39 adam Exp $ +include/srtp2/auth.h +include/srtp2/cipher.h +include/srtp2/cipher_types.h +include/srtp2/crypto_types.h +include/srtp2/srtp.h +lib/libsrtp2.so +lib/libsrtp2.so.${PKGVERSION} +lib/libsrtp2.so.2 +lib/pkgconfig/libsrtp2.pc diff --git a/comms/srtp/buildlink3.mk b/comms/srtp/buildlink3.mk index a0c0453cad9..625bd71dce5 100644 --- a/comms/srtp/buildlink3.mk +++ b/comms/srtp/buildlink3.mk @@ -1,12 +1,13 @@ -# $NetBSD: buildlink3.mk,v 1.1 2015/09/06 14:02:08 joerg Exp $ +# $NetBSD: buildlink3.mk,v 1.2 2020/05/05 17:54:39 adam Exp $ BUILDLINK_TREE+= srtp .if !defined(SRTP_BUILDLINK3_MK) SRTP_BUILDLINK3_MK:= -BUILDLINK_API_DEPENDS.srtp+= srtp>=1.4.4 +BUILDLINK_API_DEPENDS.srtp+= srtp>=2.3.0 BUILDLINK_PKGSRCDIR.srtp?= ../../comms/srtp +.include "../../security/openssl/buildlink3.mk" .endif # SRTP_BUILDLINK3_MK BUILDLINK_TREE+= -srtp diff --git a/comms/srtp/distinfo b/comms/srtp/distinfo index 62244799aa6..a92ff640840 100644 --- a/comms/srtp/distinfo +++ b/comms/srtp/distinfo @@ -1,18 +1,7 @@ -$NetBSD: distinfo,v 1.4 2016/09/26 13:20:41 maya Exp $ +$NetBSD: distinfo,v 1.5 2020/05/05 17:54:39 adam Exp $ -SHA1 (srtp-1.4.4.tgz) = 299c6cfe0c9d6f1804bc5921cfbdb6a6bc76a521 -RMD160 (srtp-1.4.4.tgz) = 64e58a3fc2cc30a8d7cba6b6ce59f807649d9dee -SHA512 (srtp-1.4.4.tgz) = 951bfec212f579daae4a5a7fc9eded163dd6790da2e3840629dbeac36d7d960f95a1f1b844505629c7815816515f0784bf9b6e1c47f2986416ec04ec9d4b7564 -Size (srtp-1.4.4.tgz) = 502890 bytes -SHA1 (patch-Makefile.in) = 8e0e6d7bed257263e4609d305dfa6a27efc1906d -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 -SHA1 (patch-include_srtp.h) = 4e680a004d14a338c7ec4cc135f21da38490c315 -SHA1 (patch-srtp_srtp.c) = 90f2674702dc2070350abc61f7773a4a6234ae33 -SHA1 (patch-test_rtpw__test.sh) = 00f28ef1e91b963ab4d413ac10925150bff4b6be +SHA1 (srtp-2.3.0.tar.gz) = 263a45a82cb1acb1a6c7beef64def31949496a02 +RMD160 (srtp-2.3.0.tar.gz) = 4a650d4eb649be9c1779d15a48f135e712406709 +SHA512 (srtp-2.3.0.tar.gz) = 34b1a01cb9a75aed175be09aadd2827224203b9801becc3fbc5214667cce79c3b87b0f59e4315583863ab5a2cc4fc81d56ab604a5e4c984518b8a8a2a7b77461 +Size (srtp-2.3.0.tar.gz) = 633819 bytes +SHA1 (patch-CMakeLists.txt) = 26975bb773ab2729a0a7df45c44239cf5fb0fb6f diff --git a/comms/srtp/patches/patch-CMakeLists.txt b/comms/srtp/patches/patch-CMakeLists.txt new file mode 100644 index 00000000000..d29fd9df560 --- /dev/null +++ b/comms/srtp/patches/patch-CMakeLists.txt @@ -0,0 +1,39 @@ +$NetBSD: patch-CMakeLists.txt,v 1.1 2020/05/05 17:54:39 adam Exp $ + +Set shared library version. +Prepare and install pkgconfig file. +Install crypto_types.h. + +--- CMakeLists.txt.orig 2019-12-23 09:58:25.000000000 +0000 ++++ CMakeLists.txt +@@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 2.8) + + project(libsrtp2 LANGUAGES C) + ++set(PACKAGE_NAME "${CMAKE_PROJECT_NAME}") + set(PACKAGE_VERSION 2.3.0) ++set(PACKAGE_SOVERSION 2) + set(PACKAGE_STRING "${CMAKE_PROJECT_NAME} ${PACKAGE_VERSION}") + + include(TestBigEndian) +@@ -184,10 +186,20 @@ if(WIN32) + target_link_libraries(srtp2 ws2_32) + endif() + ++set(prefix "${CMAKE_INSTALL_PREFIX}") ++set(libdir "\${exec_prefix}/lib") ++set(includedir "\${prefix}/include") ++configure_file(libsrtp2.pc.in libsrtp2.pc @ONLY) ++install(FILES libsrtp2.pc DESTINATION lib/pkgconfig) ++ ++set_target_properties(srtp2 PROPERTIES ++ VERSION ${PACKAGE_VERSION} SOVERSION ${PACKAGE_SOVERSION}) ++ + install(TARGETS srtp2 DESTINATION lib) + install(FILES include/srtp.h crypto/include/auth.h + crypto/include/cipher.h + crypto/include/cipher_types.h ++ crypto/include/crypto_types.h + DESTINATION include/srtp2) + + if(TEST_APPS) diff --git a/comms/srtp/patches/patch-Makefile.in b/comms/srtp/patches/patch-Makefile.in deleted file mode 100644 index 419e817d0e3..00000000000 --- a/comms/srtp/patches/patch-Makefile.in +++ /dev/null @@ -1,106 +0,0 @@ -$NetBSD: patch-Makefile.in,v 1.1 2015/09/06 14:02:08 joerg Exp $ - ---- Makefile.in.orig 2006-07-18 17:42:42.000000000 +0000 -+++ Makefile.in -@@ -66,44 +66,44 @@ libdir = @libdir@ - - # implicit rules for object files and test apps - -+%.lo: %.c -+ libtool --mode=compile $(COMPILE) -c $< -o $@ - %.o: %.c - $(COMPILE) -c $< -o $@ - - %$(EXE): %.c -- $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS) -- -+ libtool --mode=link $(COMPILE) $(LDFLAGS) $< -o $@ $(SRTPLIB) $(LIBS) - - # libcrypt.a (the crypto engine) --ciphers = crypto/cipher/cipher.o crypto/cipher/null_cipher.o \ -- crypto/cipher/aes.o crypto/cipher/aes_icm.o \ -- crypto/cipher/aes_cbc.o -+ciphers = crypto/cipher/cipher.lo crypto/cipher/null_cipher.lo \ -+ crypto/cipher/aes.lo crypto/cipher/aes_icm.lo \ -+ crypto/cipher/aes_cbc.lo - --hashes = crypto/hash/null_auth.o crypto/hash/sha1.o \ -- crypto/hash/hmac.o crypto/hash/auth.o # crypto/hash/tmmhv2.o -+hashes = crypto/hash/null_auth.lo crypto/hash/sha1.lo \ -+ crypto/hash/hmac.lo crypto/hash/auth.lo # crypto/hash/tmmhv2.lo - --replay = crypto/replay/rdb.o crypto/replay/rdbx.o \ -- crypto/replay/ut_sim.o -+replay = crypto/replay/rdb.lo crypto/replay/rdbx.lo \ -+ crypto/replay/ut_sim.lo - --math = crypto/math/datatypes.o crypto/math/stat.o -+math = crypto/math/datatypes.lo crypto/math/stat.lo - --ust = crypto/ust/ust.o -+ust = crypto/ust/ust.lo - --rng = crypto/rng/$(RNG_OBJS) crypto/rng/prng.o crypto/rng/ctr_prng.o -+rng = crypto/rng/$(RNG_OBJS) crypto/rng/prng.lo crypto/rng/ctr_prng.lo - --err = crypto/kernel/err.o -+err = crypto/kernel/err.lo - --kernel = crypto/kernel/crypto_kernel.o crypto/kernel/alloc.o \ -- crypto/kernel/key.o $(rng) $(err) # $(ust) -+kernel = crypto/kernel/crypto_kernel.lo crypto/kernel/alloc.lo \ -+ crypto/kernel/key.lo $(rng) $(err) # $(ust) - - cryptobj = $(ciphers) $(hashes) $(math) $(stat) $(kernel) $(replay) - - # libsrtp.a (implements srtp processing) - --srtpobj = srtp/srtp.o -+srtpobj = srtp/srtp.lo - --libsrtp.a: $(srtpobj) $(cryptobj) $(gdoi) -- ar cr libsrtp.a $^ -- $(RANLIB) libsrtp.a -+libsrtp.la: $(srtpobj) $(cryptobj) $(gdoi) -+ libtool --mode=link ${CC} -rpath ${libdir} -version-info 1 -o $@ $(srtpobj) $(cryptobj) $(gdoi) - - # libcryptomath.a contains general-purpose routines that are used to - # generate tables and verify cryptoalgorithm implementations - this -@@ -127,19 +127,19 @@ testapp = $(crypto_testapp) test/srtp_dr - test/roc_driver$(EXE) test/rdbx_driver$(EXE) test/rtpw$(EXE) \ - test/dtls_srtp_driver$(EXE) - --$(testapp): libsrtp.a -+$(testapp): libsrtp.la - --test/rtpw$(EXE): test/rtpw.c test/rtp.c test/getopt_s.c -- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) -+test/rtpw$(EXE): test/rtpw.lo test/rtp.lo test/getopt_s.lo -+ libtool --mode=link $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) - --test/srtp_driver$(EXE): test/srtp_driver.c test/getopt_s.c -- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) -+test/srtp_driver$(EXE): test/srtp_driver.lo test/getopt_s.lo -+ libtool --mode=link $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) - --test/rdbx_driver$(EXE): test/rdbx_driver.c test/getopt_s.c -- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) -+test/rdbx_driver$(EXE): test/rdbx_driver.lo test/getopt_s.lo -+ libtool --mode=link $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) - --test/dtls_srtp_driver$(EXE): test/dtls_srtp_driver.c test/getopt_s.c -- $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) -+test/dtls_srtp_driver$(EXE): test/dtls_srtp_driver.lo test/getopt_s.lo -+ libtool --mode=link $(COMPILE) $(LDFLAGS) -o $@ $^ $(LIBS) $(SRTPLIB) - - test: $(testapp) - @echo "Build done. Please run '$(MAKE) runtest' to run self tests." -@@ -196,7 +196,7 @@ install: - $(INSTALL) -d $(DESTDIR)$(libdir) - cp include/*.h $(DESTDIR)$(includedir)/srtp - cp crypto/include/*.h $(DESTDIR)$(includedir)/srtp -- if [ -f libsrtp.a ]; then cp libsrtp.a $(DESTDIR)$(libdir)/; fi -+ if [ -f libsrtp.la ]; then libtool --mode=install cp libsrtp.la $(DESTDIR)$(libdir)/; fi - - uninstall: - rm -rf $(DESTDIR)$(includedir)/srtp diff --git a/comms/srtp/patches/patch-configure b/comms/srtp/patches/patch-configure deleted file mode 100644 index 745b15260a2..00000000000 --- a/comms/srtp/patches/patch-configure +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-configure,v 1.1 2015/09/06 14:02:08 joerg Exp $ - ---- configure.orig 2005-10-03 15:23:13.000000000 +0000 -+++ configure -@@ -2493,11 +2493,11 @@ fi - echo "$as_me:$LINENO: checking which random device to use" >&5 - echo $ECHO_N "checking which random device to use... $ECHO_C" >&6 - if test "$enable_kernel_linux" = "yes"; then -- RNG_OBJS=rand_linux_kernel.o -+ RNG_OBJS=rand_linux_kernel.lo - echo "$as_me:$LINENO: result: Linux kernel builtin" >&5 - echo "${ECHO_T}Linux kernel builtin" >&6 - else -- RNG_OBJS=rand_source.o -+ RNG_OBJS=rand_source.lo - if test -n "$DEV_URANDOM"; then - - cat >>confdefs.h <<_ACEOF -@@ -7158,7 +7158,7 @@ cat >>confdefs.h <<\_ACEOF - #define SRTP_GDOI 1 - _ACEOF - -- GDOI_OBJS=gdoi/srtp+gdoi.o -+ GDOI_OBJS=gdoi/srtp+gdoi.lo - - fi - echo "$as_me:$LINENO: result: $enable_gdoi" >&5 diff --git a/comms/srtp/patches/patch-configure.in b/comms/srtp/patches/patch-configure.in deleted file mode 100644 index 488b220886f..00000000000 --- a/comms/srtp/patches/patch-configure.in +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-configure.in,v 1.1 2015/09/06 14:02:08 joerg Exp $ - ---- configure.in.orig 2005-10-03 15:19:02.000000000 +0000 -+++ configure.in -@@ -34,10 +34,10 @@ fi - - AC_MSG_CHECKING(which random device to use) - if test "$enable_kernel_linux" = "yes"; then -- RNG_OBJS=rand_linux_kernel.o -+ RNG_OBJS=rand_linux_kernel.lo - AC_MSG_RESULT([Linux kernel builtin]) - else -- RNG_OBJS=rand_source.o -+ RNG_OBJS=rand_source.lo - if test -n "$DEV_URANDOM"; then - AC_DEFINE_UNQUOTED(DEV_URANDOM, "$DEV_URANDOM",[Path to random device]) - AC_MSG_RESULT([$DEV_URANDOM]) -@@ -182,7 +182,7 @@ AC_ARG_ENABLE(gdoi, - [], enable_gdoi=no) - if test "$enable_gdoi" = "yes"; then - AC_DEFINE(SRTP_GDOI, 1, [Define to use GDOI.]) -- GDOI_OBJS=gdoi/srtp+gdoi.o -+ GDOI_OBJS=gdoi/srtp+gdoi.lo - AC_SUBST(GDOI_OBJS) - fi - AC_MSG_RESULT($enable_gdoi) diff --git a/comms/srtp/patches/patch-crypto_cipher_aes__icm.c b/comms/srtp/patches/patch-crypto_cipher_aes__icm.c deleted file mode 100644 index 922f2810a9a..00000000000 --- a/comms/srtp/patches/patch-crypto_cipher_aes__icm.c +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-crypto_cipher_aes__icm.c,v 1.1 2015/09/14 13:30:03 joerg Exp $ - ---- crypto/cipher/aes_icm.c.orig 2015-09-13 19:21:36.000000000 +0000 -+++ crypto/cipher/aes_icm.c -@@ -283,7 +283,7 @@ aes_icm_set_iv(aes_icm_ctx_t *c, void *i - * this is an internal, hopefully inlined function - */ - --inline void -+static inline void - aes_icm_advance_ismacryp(aes_icm_ctx_t *c, uint8_t forIsmacryp) { - /* fill buffer with new keystream */ - v128_copy(&c->keystream_buffer, &c->counter); -@@ -308,7 +308,7 @@ aes_icm_advance_ismacryp(aes_icm_ctx_t * - } - } - --inline void aes_icm_advance(aes_icm_ctx_t *c) { -+static inline void aes_icm_advance(aes_icm_ctx_t *c) { - aes_icm_advance_ismacryp(c, 0); - } - diff --git a/comms/srtp/patches/patch-crypto_hash_hmac.c b/comms/srtp/patches/patch-crypto_hash_hmac.c deleted file mode 100644 index 94df2ffbf0c..00000000000 --- a/comms/srtp/patches/patch-crypto_hash_hmac.c +++ /dev/null @@ -1,58 +0,0 @@ -$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, diff --git a/comms/srtp/patches/patch-crypto_kernel_crypto__kernel.c b/comms/srtp/patches/patch-crypto_kernel_crypto__kernel.c deleted file mode 100644 index 0c2fe64e4cd..00000000000 --- a/comms/srtp/patches/patch-crypto_kernel_crypto__kernel.c +++ /dev/null @@ -1,24 +0,0 @@ -$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; - diff --git a/comms/srtp/patches/patch-crypto_math_datatypes.c b/comms/srtp/patches/patch-crypto_math_datatypes.c deleted file mode 100644 index 29b59f2680e..00000000000 --- a/comms/srtp/patches/patch-crypto_math_datatypes.c +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-crypto_math_datatypes.c,v 1.1 2015/09/14 13:30:03 joerg Exp $ - ---- crypto/math/datatypes.c.orig 2015-09-13 19:22:57.000000000 +0000 -+++ crypto/math/datatypes.c -@@ -124,7 +124,7 @@ octet_string_hex_string(const void *s, i - return bit_string; - } - --inline int -+static inline int - hex_char_to_nibble(uint8_t c) { - switch(c) { - case ('0'): return 0x0; diff --git a/comms/srtp/patches/patch-crypto_math_gf2__8.c b/comms/srtp/patches/patch-crypto_math_gf2__8.c deleted file mode 100644 index 67bb8780a40..00000000000 --- a/comms/srtp/patches/patch-crypto_math_gf2__8.c +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-crypto_math_gf2__8.c,v 1.1 2015/09/14 13:30:03 joerg Exp $ - ---- crypto/math/gf2_8.c.orig 2015-09-13 19:22:59.000000000 +0000 -+++ crypto/math/gf2_8.c -@@ -50,7 +50,7 @@ - - /* gf2_8_shift() moved to gf2_8.h as an inline function */ - --inline gf2_8 -+static inline gf2_8 - gf2_8_multiply(gf2_8 x, gf2_8 y) { - gf2_8 z = 0; - diff --git a/comms/srtp/patches/patch-crypto_math_math.c b/comms/srtp/patches/patch-crypto_math_math.c deleted file mode 100644 index 7b5aadf2317..00000000000 --- a/comms/srtp/patches/patch-crypto_math_math.c +++ /dev/null @@ -1,47 +0,0 @@ -$NetBSD: patch-crypto_math_math.c,v 1.1 2015/09/14 13:30:03 joerg Exp $ - ---- crypto/math/math.c.orig 2015-09-13 19:23:02.000000000 +0000 -+++ crypto/math/math.c -@@ -173,7 +173,7 @@ v32_weight(v32_t a) { - return wt; - } - --inline unsigned char -+static inline unsigned char - v32_distance(v32_t x, v32_t y) { - x.value ^= y.value; - return v32_weight(x); -@@ -524,13 +524,13 @@ A_times_x_plus_b(uint8_t A[8], uint8_t x - return b; - } - --inline void -+static inline void - v16_copy_octet_string(v16_t *x, const uint8_t s[2]) { - x->v8[0] = s[0]; - x->v8[1] = s[1]; - } - --inline void -+static inline void - v32_copy_octet_string(v32_t *x, const uint8_t s[4]) { - x->v8[0] = s[0]; - x->v8[1] = s[1]; -@@ -538,7 +538,7 @@ v32_copy_octet_string(v32_t *x, const ui - x->v8[3] = s[3]; - } - --inline void -+static inline void - v64_copy_octet_string(v64_t *x, const uint8_t s[8]) { - x->v8[0] = s[0]; - x->v8[1] = s[1]; -@@ -632,7 +632,7 @@ v128_set_bit_to(v128_t *x, int i, int y) - #endif /* DATATYPES_USE_MACROS */ - - --inline void -+static inline void - v128_left_shift2(v128_t *x, int num_bits) { - int i; - int word_shift = num_bits >> 5; diff --git a/comms/srtp/patches/patch-include_srtp.h b/comms/srtp/patches/patch-include_srtp.h deleted file mode 100644 index bbb21bb9c5a..00000000000 --- a/comms/srtp/patches/patch-include_srtp.h +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-include_srtp.h,v 1.1 2015/09/06 14:02:08 joerg Exp $ - ---- include/srtp.h.orig 2006-07-12 22:22:10.000000000 +0000 -+++ include/srtp.h -@@ -258,6 +258,16 @@ err_status_t - srtp_init(void); - - /** -+ * @brief srtp_shutdown() releases allocated resources -+ * -+ * @warning After calling this function srtp functions are no longer -+ * available. -+ */ -+ -+err_status_t -+srtp_shutdown(void); -+ -+/** - * @brief srtp_protect() is the Secure RTP sender-side packet processing - * function. - * diff --git a/comms/srtp/patches/patch-srtp_srtp.c b/comms/srtp/patches/patch-srtp_srtp.c deleted file mode 100644 index 6eb244b44dc..00000000000 --- a/comms/srtp/patches/patch-srtp_srtp.c +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-srtp_srtp.c,v 1.1 2015/09/06 14:02:08 joerg Exp $ - ---- srtp/srtp.c.orig 2006-07-18 19:45:46.000000000 +0000 -+++ srtp/srtp.c -@@ -1905,3 +1905,14 @@ srtp_profile_get_master_salt_length(srtp - return 0; /* indicate error by returning a zero */ - } - } -+ -+err_status_t -+srtp_shutdown(void) { -+ err_status_t status; -+ -+ /* shutdown the crypto kernel */ -+ status = crypto_kernel_shutdown(); -+ if (status) -+ return status; -+ return err_status_ok; -+} diff --git a/comms/srtp/patches/patch-test_rtpw__test.sh b/comms/srtp/patches/patch-test_rtpw__test.sh deleted file mode 100644 index cabdcd80312..00000000000 --- a/comms/srtp/patches/patch-test_rtpw__test.sh +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-test_rtpw__test.sh,v 1.1 2015/09/06 14:02:08 joerg Exp $ - ---- test/rtpw_test.sh.orig 2006-06-13 15:17:57.000000000 +0000 -+++ test/rtpw_test.sh -@@ -4,7 +4,7 @@ - # - # tests the rtpw sender and receiver functions - --RTPW=rtpw -+RTPW=./rtpw - DEST_PORT=9999 - DURATION=3 - |