summaryrefslogtreecommitdiff
path: root/net-libs/libsrtp
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/libsrtp')
-rw-r--r--net-libs/libsrtp/Manifest7
-rw-r--r--net-libs/libsrtp/files/libsrtp-2.3.0-gcc-10.patch26
-rw-r--r--net-libs/libsrtp/files/libsrtp-2.3.0-nss.patch12
-rw-r--r--net-libs/libsrtp/files/libsrtp-2.3.0-rtp-header.patch24
-rw-r--r--net-libs/libsrtp/libsrtp-2.3.0-r1.ebuild96
-rw-r--r--net-libs/libsrtp/metadata.xml1
6 files changed, 165 insertions, 1 deletions
diff --git a/net-libs/libsrtp/Manifest b/net-libs/libsrtp/Manifest
index 79effc1051e7..58923b9a4e74 100644
--- a/net-libs/libsrtp/Manifest
+++ b/net-libs/libsrtp/Manifest
@@ -4,9 +4,14 @@ AUX libsrtp-1.6.0-openssl-aem_icm-key.patch 3870 BLAKE2B 47dd3f9def13b48cc19657b
AUX libsrtp-1.6.0-openssl-hmac.patch 7673 BLAKE2B 92d4aa2699b324b81540f2e2fb360e1a4864b2626062c96265dade3581ad3af7119e0f6ebd8b1bdcd3591bcde29bffa2b516ed9ee0bdd4c578a5274805c1a7cd SHA512 c187d0249243e26d6cdae4a24b593651fb006b473d0a72b6c4c9b6ad2025893a37e33b163adbee728aa702223397b98fbc38ac2856b737dd03fd067b4dc4baf0
AUX libsrtp-2.2.0-gcc-10.patch 724 BLAKE2B 559079dd02413b25fa03b90bdbf709d2b16ccc5b0f0db97fb2558ab21773648d3e0fbded74b8bee2fe6d94c68da746f156b9d7b3b3b682d809715929f4e597a5 SHA512 3a1c51620af703e9dd061101e29288458452f9d0f2758dd29e9494689357d3adf408cdc7e2f60fe606680970364c0d55cc2bb4e7618b86b76384f6ab208352ed
AUX libsrtp-2.2.0-pcap-automagic-r0.patch 729 BLAKE2B 8933586830cab4c911ff5271cdddb6a959dc59d0fcaa340faf5d04ad9b6803d676d626ce6cecdee1e097defc3c69df7e1216f012276e81c22fb043e6b0e633c4 SHA512 b3c80f5d05748eeb5d93f1c5fe2cc73b3380529a8de44315291fe2a9fbf32df861dec511038f551df65c2cb2592ce337d497c06c8855ce8dd1def9a67bae40ad
+AUX libsrtp-2.3.0-gcc-10.patch 752 BLAKE2B 6d401cbbc0c57487183390293b54c572dc3d263b94c6edd66be5986d46746390160f8d3c95346b311bf00439eb826d7734568be462ac8c7eafcc5f3a8556b24b SHA512 4bce9f8b95fce4b89f8e9a2c10cead73e363dc966ec0574516b56cb3124edf49a8d00806f5d5de6cc8610140c21183350b4dec7b1225bcaa6e5592250293cd40
+AUX libsrtp-2.3.0-nss.patch 431 BLAKE2B f56fcf59fd43618b76fca02873b57a9bd073cc67cafe9797b58702379f01e825ba4f3391f62cab9e4a1173b66c55bdea82bfb5e108bd8f68af1b0a29fe6fdafb SHA512 0e54f320a8fc4c27ad5ac40bad07c45a3f75b01ba375aa07a1c35804ba73c1f3cd4b830b6626bff128e59d6f69433bc80028eac55cc4038db25874fde882c53d
+AUX libsrtp-2.3.0-rtp-header.patch 904 BLAKE2B f2756956a913e6be8c49d0d178f2351cb3ac634523979f47add96814d9514c7b2c4343f9302d4f24f0e75cd543aee9c587552b3cb415ceca32403d51c8550036 SHA512 e2e9dea744f6cc41a4351a443e2712b9471ffb1df0f69c41e99e562d896db3c4b29bd684352334b31a03de61a18154ac9d7fb94ab40192a5058cfa2574b81711
AUX libsrtp-pcap-automagic-r0.patch 615 BLAKE2B 5e4edeafd8f9e921c211b67064c72aecd10a708d16c8e89ea6be01ff69126ca546528532b05bc23aae80f07bac6dd2dacfc0ce6b977f6f0efae44ab017ab03d9 SHA512 ee55bdf6f9c77ebacd7469db92f42ed09728fe91a81496ff425c07ad8610e9998fec2a8992b4fafd7c684bb06989837b0244172ed96483984d1c2e6ff6c0dc0c
DIST libsrtp-1.6.0.tar.gz 1648862 BLAKE2B 5526d7659db160df3b6d9f14922bd731d083f04c6dd084ef473c439d720733d0fd8b38bdfe92e30e05a8a94c41df965d04bca52601b2644352428b49b1ed9093 SHA512 5ac712d0d343c3b63ed248503cc7d33c637895a274c4434c91f513be117836f27cd5daba83088b4647bbd9c82d841e216e6346af8d485cb9ddcd35dee21d4887
DIST libsrtp-2.2.0.tar.gz 308469 BLAKE2B 4ef318bdf5c69b69b5869f478d5f0b9ee82d7d8a52440d10e931722c75b2f3a62b59f7542bb932cc93a21b7af24e6b253d70b4722833c5e1e5afce052e3b00e2 SHA512 3a5214b02199ae8dff45a2ed225ed9b1dcb75a9c6b07669e23bf86f97ad26e3e22b4930acdf3c56b21b605211a89a53a17c61602195b391a5b29a09823ba868c
+DIST libsrtp-2.3.0.tar.gz 633819 BLAKE2B 9ea40e9689fabc29b7a2c637bd4e4a2c44eec79205a6e5c5e5abf1069dfec7ba28d868ba620462205d61fdb28d0ca3b8532c1f59db704edd508e01afb551d255 SHA512 34b1a01cb9a75aed175be09aadd2827224203b9801becc3fbc5214667cce79c3b87b0f59e4315583863ab5a2cc4fc81d56ab604a5e4c984518b8a8a2a7b77461
EBUILD libsrtp-1.6.0-r1.ebuild 2400 BLAKE2B 184f09d2d76d04e071f39e586f561f9513b95697a64433fc00ba66712e35355452f2ae8ef92ade71769fe8c40251cdd8144ba0fdb4e4148ac09c885aeeda660d SHA512 2e1ec0bb8d1cadb2f7709a9a6a63980f51585418f8cba4fabc044c98e849fa6352a754c1a5c4d2d4e811c3fa1c3526fd6f1c3b88db26fdafb1214f12a87b7c9d
EBUILD libsrtp-2.2.0.ebuild 1899 BLAKE2B ef1b0dab4409a0da2811094516d413ca1709bde65dfac72b305e5247e9e6c6944de7e56e2c638b6c4f5c94e499652fba31debb580cddbb87028e14dc0cae1644 SHA512 c1cf00d2cfcfaed74251b989801482a606cca5e05d0a323ac055085d49f1dadcdfd3e2cbb3c440a73ff15dfe8c7dfc5f60561867559c9d00a888f9ca2ead86c7
-MISC metadata.xml 785 BLAKE2B 4dca0339742c5c52eede087bc89e86b8f1da07dd895e1c3361f11456d2408361ead847997ea9d344e369949cf0d29ff88a22fa65917b7c74143b642f8d28d716 SHA512 3c23a7d6242dc7d42e34681850ad861bb67a5c44c5113ef5a82201127900e66bfbe03d065f60410d5652ed2abada24b1ac373a6c061392b48afb97080caa718d
+EBUILD libsrtp-2.3.0-r1.ebuild 2012 BLAKE2B e48af05709bf26b8d1cf20cd2fdeb31634bf03f81a9f25cf9346422e5882535ab75df5c2e3a1688fd29541fbb562e626a5ee8a269bbdcb50a03f3f0d75f3bd11 SHA512 6acbc170ce15f60dd7fb524933baaf76f0653206f351db2920a304167c2ee14aed6e3f06c604c6861b7c102a27f5883eb84cdc1f03348caf91d36b8c27f04e7f
+MISC metadata.xml 837 BLAKE2B f256f76392707dd326a4640809e9333d5ac89d2d7da768b3d630d6c78ed3f873ff8d9060463c07561d9da810088b7f6cc766038192ec995486de08c421e1dded SHA512 ba6fd1852b9b226f2a418670df78c75e0a8bb509b23a0a4cc9b806daa82f4f6f0af4624a13f2788931ec758635549df31a0b2c2d6588388695523a7d511fd055
diff --git a/net-libs/libsrtp/files/libsrtp-2.3.0-gcc-10.patch b/net-libs/libsrtp/files/libsrtp-2.3.0-gcc-10.patch
new file mode 100644
index 000000000000..67d4ad86d516
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-2.3.0-gcc-10.patch
@@ -0,0 +1,26 @@
+diff --git a/crypto/math/datatypes.c b/crypto/math/datatypes.c
+index 001584c..4fcb396 100644
+--- a/crypto/math/datatypes.c
++++ b/crypto/math/datatypes.c
+@@ -79,7 +79,7 @@ int octet_get_weight(uint8_t octet)
+
+ /* the value MAX_PRINT_STRING_LEN is defined in datatypes.h */
+
+-char bit_string[MAX_PRINT_STRING_LEN];
++static char bit_string[MAX_PRINT_STRING_LEN];
+
+ uint8_t srtp_nibble_to_hex_char(uint8_t nibble)
+ {
+diff --git a/test/util.c b/test/util.c
+index 2abc28e..c0f7614 100644
+--- a/test/util.c
++++ b/test/util.c
+@@ -49,7 +49,7 @@
+ #include <stdint.h>
+
+ /* include space for null terminator */
+-char bit_string[MAX_PRINT_STRING_LEN + 1];
++static char bit_string[MAX_PRINT_STRING_LEN + 1];
+
+ static inline int hex_char_to_nibble(uint8_t c)
+ {
diff --git a/net-libs/libsrtp/files/libsrtp-2.3.0-nss.patch b/net-libs/libsrtp/files/libsrtp-2.3.0-nss.patch
new file mode 100644
index 000000000000..6f71839e69da
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-2.3.0-nss.patch
@@ -0,0 +1,12 @@
+diff --git a/crypto/cipher/aes_gcm_nss.c b/crypto/cipher/aes_gcm_nss.c
+index 54547cd..ecbba64 100644
+--- a/crypto/cipher/aes_gcm_nss.c
++++ b/crypto/cipher/aes_gcm_nss.c
+@@ -284,6 +284,7 @@ static srtp_err_status_t srtp_aes_gcm_nss_do_crypto(void *cv,
+
+ c->params.pIv = c->iv;
+ c->params.ulIvLen = GCM_IV_LEN;
++ c->params.ulIvBits = 8 * GCM_IV_LEN;
+ c->params.pAAD = c->aad;
+ c->params.ulAADLen = c->aad_size;
+
diff --git a/net-libs/libsrtp/files/libsrtp-2.3.0-rtp-header.patch b/net-libs/libsrtp/files/libsrtp-2.3.0-rtp-header.patch
new file mode 100644
index 000000000000..096b19e8f344
--- /dev/null
+++ b/net-libs/libsrtp/files/libsrtp-2.3.0-rtp-header.patch
@@ -0,0 +1,24 @@
+From 55299517f39e2e1a34df05c27cbc9898071ac9db Mon Sep 17 00:00:00 2001
+From: Lennart Grahl <lennart.grahl@gmail.com>
+Date: Mon, 18 May 2020 18:01:08 +0200
+Subject: [PATCH] Fix two-byte RTP header extension encryption
+
+Also ignores the application bits as required by RFC 8285, sec 4.3
+Fixes #490
+---
+ srtp/srtp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/srtp/srtp.c b/srtp/srtp.c
+index b45cee0f..176b01f0 100644
+--- a/srtp/srtp.c
++++ b/srtp/srtp.c
+@@ -1423,7 +1423,7 @@ static srtp_err_status_t srtp_process_header_encryption(
+ xtn_hdr_data++;
+ }
+ }
+- } else if ((ntohs(xtn_hdr->profile_specific) & 0x1fff) == 0x100) {
++ } else if ((ntohs(xtn_hdr->profile_specific) & 0xfff0) == 0x1000) {
+ /* RFC 5285, section 4.3. Two-Byte Header */
+ while (xtn_hdr_data + 1 < xtn_hdr_end) {
+ uint8_t xid = *xtn_hdr_data;
diff --git a/net-libs/libsrtp/libsrtp-2.3.0-r1.ebuild b/net-libs/libsrtp/libsrtp-2.3.0-r1.ebuild
new file mode 100644
index 000000000000..552f914255bf
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-2.3.0-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="debug doc libressl nss openssl static-libs test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( nss openssl )"
+
+RDEPEND="
+ openssl? (
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ )
+ nss? ( >=dev-libs/nss-3.52[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+ doc? ( app-doc/doxygen )
+ virtual/pkgconfig
+"
+
+DOCS=( CHANGES )
+
+PATCHES=(
+ "${FILESDIR}/${P}-gcc-10.patch"
+ "${FILESDIR}/${P}-nss.patch"
+ "${FILESDIR}/${P}-rtp-header.patch"
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+
+ if use doc; then
+ echo "${PV}" > "${S}/VERSION"
+ fi
+
+ # sadly, tests are too broken to even consider using work-arounds
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # stdout: default error output for messages in debug
+ # pcap: seems to be test-only
+ # openssl-kdf: OpenSSL 1.1.0+
+ econf \
+ --enable-log-stdout \
+ --disable-pcap \
+ --disable-openssl-kdf \
+ $(use_enable debug debug-logging) \
+ $(use_enable openssl) \
+ $(use_enable nss)
+}
+
+multilib_src_compile() {
+ use static-libs && emake ${PN}2.a
+ emake shared_library
+ use test && emake test
+ if multilib_is_native_abi && use doc; then
+ emake libsrtp2doc
+ fi
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
+
+ # Makefile.in has '$(testapp): libsrtp2.a'
+ if ! use static-libs; then
+ rm libsrtp2.a || die
+ fi
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use doc; then
+ dodoc -r doc/html
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+}
diff --git a/net-libs/libsrtp/metadata.xml b/net-libs/libsrtp/metadata.xml
index 452aeee73ceb..1ee9c5bae6cd 100644
--- a/net-libs/libsrtp/metadata.xml
+++ b/net-libs/libsrtp/metadata.xml
@@ -14,6 +14,7 @@
<flag name="console">
Use /dev/console instead of stdout for error messages
</flag>
+ <flag name="nss">Use NSS crypto primitives</flag>
<flag name="openssl">Use OpenSSL crypto primitives</flag>
<flag name="syslog">Use syslog for error messages</flag>
</use>