diff options
author | joerg <joerg@pkgsrc.org> | 2015-09-06 14:02:08 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-09-06 14:02:08 +0000 |
commit | aed052e74ad6da22c19f196142206e3add4a03c8 (patch) | |
tree | 43d9aba99d9ab2ba3f3f33b56c82330410ad047e /comms | |
parent | 69acd2429aaf4ba85cd6a3c8157cb3990bac2d05 (diff) | |
download | pkgsrc-aed052e74ad6da22c19f196142206e3add4a03c8.tar.gz |
Add srtp-1.4.4, an implementation of Secure RTP.
Diffstat (limited to 'comms')
-rw-r--r-- | comms/srtp/DESCR | 2 | ||||
-rw-r--r-- | comms/srtp/Makefile | 21 | ||||
-rw-r--r-- | comms/srtp/PLIST | 36 | ||||
-rw-r--r-- | comms/srtp/buildlink3.mk | 12 | ||||
-rw-r--r-- | comms/srtp/distinfo | 11 | ||||
-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-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 |
11 files changed, 294 insertions, 0 deletions
diff --git a/comms/srtp/DESCR b/comms/srtp/DESCR new file mode 100644 index 00000000000..20f94f30714 --- /dev/null +++ b/comms/srtp/DESCR @@ -0,0 +1,2 @@ +The libSRTP library is an open-source implementation of the Secure +Real-time Transport Protocol (SRTP). diff --git a/comms/srtp/Makefile b/comms/srtp/Makefile new file mode 100644 index 00000000000..93a84bb8801 --- /dev/null +++ b/comms/srtp/Makefile @@ -0,0 +1,21 @@ +# $NetBSD: Makefile,v 1.1 2015/09/06 14:02:08 joerg Exp $ + +DISTNAME= srtp-1.4.4 +CATEGORIES= comms security +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=srtp/} +EXTRACT_SUFX= .tgz + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://srtp.sourceforge.net/ +COMMENT= Secure Real-time Transport Protocol library + +USE_TOOLS+= gmake +USE_LIBTOOL= yes +GNU_CONFIGURE= yes + +LDFLAGS.SunOS+= -lsocket -lnsl +TEST_TARGET= runtest + +WRKSRC= ${WRKDIR}/srtp + +.include "../../mk/bsd.pkg.mk" diff --git a/comms/srtp/PLIST b/comms/srtp/PLIST new file mode 100644 index 00000000000..91e5b6eca67 --- /dev/null +++ b/comms/srtp/PLIST @@ -0,0 +1,36 @@ +@comment $NetBSD: PLIST,v 1.1 2015/09/06 14:02:08 joerg Exp $ +include/srtp/aes_cbc.h +include/srtp/aes_icm.h +include/srtp/aes.h +include/srtp/alloc.h +include/srtp/auth.h +include/srtp/cipher.h +include/srtp/config.h +include/srtp/crypto_kernel.h +include/srtp/crypto_math.h +include/srtp/crypto_types.h +include/srtp/crypto.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_priv.h +include/srtp/rtp.h +include/srtp/sha1.h +include/srtp/srtp_priv.h +include/srtp/srtp.h +include/srtp/stat.h +include/srtp/ut_sim.h +include/srtp/xfm.h +lib/libsrtp.la diff --git a/comms/srtp/buildlink3.mk b/comms/srtp/buildlink3.mk new file mode 100644 index 00000000000..a0c0453cad9 --- /dev/null +++ b/comms/srtp/buildlink3.mk @@ -0,0 +1,12 @@ +# $NetBSD: buildlink3.mk,v 1.1 2015/09/06 14:02:08 joerg Exp $ + +BUILDLINK_TREE+= srtp + +.if !defined(SRTP_BUILDLINK3_MK) +SRTP_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.srtp+= srtp>=1.4.4 +BUILDLINK_PKGSRCDIR.srtp?= ../../comms/srtp +.endif # SRTP_BUILDLINK3_MK + +BUILDLINK_TREE+= -srtp diff --git a/comms/srtp/distinfo b/comms/srtp/distinfo new file mode 100644 index 00000000000..e0ff81f2e38 --- /dev/null +++ b/comms/srtp/distinfo @@ -0,0 +1,11 @@ +$NetBSD: distinfo,v 1.1 2015/09/06 14:02:08 joerg Exp $ + +SHA1 (srtp-1.4.4.tgz) = 299c6cfe0c9d6f1804bc5921cfbdb6a6bc76a521 +RMD160 (srtp-1.4.4.tgz) = 64e58a3fc2cc30a8d7cba6b6ce59f807649d9dee +Size (srtp-1.4.4.tgz) = 502890 bytes +SHA1 (patch-Makefile.in) = 8e0e6d7bed257263e4609d305dfa6a27efc1906d +SHA1 (patch-configure) = d70d01b5f846b2f163ba2246511cf1314005fa35 +SHA1 (patch-configure.in) = 217c066920fedaaba02d86e3c2017a368ea8fee7 +SHA1 (patch-include_srtp.h) = 4e680a004d14a338c7ec4cc135f21da38490c315 +SHA1 (patch-srtp_srtp.c) = 90f2674702dc2070350abc61f7773a4a6234ae33 +SHA1 (patch-test_rtpw__test.sh) = 00f28ef1e91b963ab4d413ac10925150bff4b6be diff --git a/comms/srtp/patches/patch-Makefile.in b/comms/srtp/patches/patch-Makefile.in new file mode 100644 index 00000000000..419e817d0e3 --- /dev/null +++ b/comms/srtp/patches/patch-Makefile.in @@ -0,0 +1,106 @@ +$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 new file mode 100644 index 00000000000..745b15260a2 --- /dev/null +++ b/comms/srtp/patches/patch-configure @@ -0,0 +1,27 @@ +$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 new file mode 100644 index 00000000000..488b220886f --- /dev/null +++ b/comms/srtp/patches/patch-configure.in @@ -0,0 +1,26 @@ +$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-include_srtp.h b/comms/srtp/patches/patch-include_srtp.h new file mode 100644 index 00000000000..bbb21bb9c5a --- /dev/null +++ b/comms/srtp/patches/patch-include_srtp.h @@ -0,0 +1,21 @@ +$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 new file mode 100644 index 00000000000..6eb244b44dc --- /dev/null +++ b/comms/srtp/patches/patch-srtp_srtp.c @@ -0,0 +1,19 @@ +$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 new file mode 100644 index 00000000000..cabdcd80312 --- /dev/null +++ b/comms/srtp/patches/patch-test_rtpw__test.sh @@ -0,0 +1,13 @@ +$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 + |