Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/mbedtls: add configurable SRTP support
@ 2022-08-28 13:05 Dmitry Ilyin
  2022-08-28 14:01 ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Ilyin @ 2022-08-28 13:05 UTC (permalink / raw)
  To: buildroot; +Cc: Dmitry Ilyin, Fabrice Fontaine

This adds new BR2_PACKAGE_MBEDTLS_SRTP_SUPPORT option to have MbedTLS
builds that support SRTP (required option for AWS WebRTC library)
---
 package/mbedtls/Config.in  | 6 ++++++
 package/mbedtls/mbedtls.mk | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/package/mbedtls/Config.in b/package/mbedtls/Config.in
index a39ba65d98..f06a27fc5c 100644
--- a/package/mbedtls/Config.in
+++ b/package/mbedtls/Config.in
@@ -29,4 +29,10 @@ config BR2_PACKAGE_MBEDTLS_COMPRESSION
 	  sure CRIME and similar attacks are not applicable to your
 	  particular situation.
 
+config BR2_PACKAGE_MBEDTLS_SRTP
+	bool "enable SRTP support"
+	help
+	  Enable support for negotiation of DTLS-SRTP (RFC 5764)
+	  through the use_srtp extension.
+
 endif
diff --git a/package/mbedtls/mbedtls.mk b/package/mbedtls/mbedtls.mk
index af87d62b30..9f9aee1fec 100644
--- a/package/mbedtls/mbedtls.mk
+++ b/package/mbedtls/mbedtls.mk
@@ -72,4 +72,12 @@ else ifeq ($(BR2_microblaze)$(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS_CPU_MIPS64R6),y)
 MBEDTLS_POST_CONFIGURE_HOOKS += MBEDTLS_DISABLE_ASM
 endif
 
+ifeq ($(BR2_PACKAGE_MBEDTLS_SRTP_SUPPORT),y)
+define MBEDTLS_ENABLE_SRTP
+	$(SED) "s://#define MBEDTLS_SSL_DTLS_SRTP:#define MBEDTLS_SSL_DTLS_SRTP:" \
+		$(@D)/include/mbedtls/config.h
+endef
+MBEDTLS_POST_PATCH_HOOKS += MBEDTLS_ENABLE_SRTP
+endif
+
 $(eval $(cmake-package))
-- 
2.37.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-28 18:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-28 13:05 [Buildroot] [PATCH] package/mbedtls: add configurable SRTP support Dmitry Ilyin
2022-08-28 14:01 ` Yann E. MORIN
2022-08-28 14:36   ` Dmitry Ilyin
2022-08-28 15:53     ` Dmitry Ilyin
2022-08-28 18:59       ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox