mirror of
https://github.com/espressif/esp-protocols.git
synced 2026-07-05 16:10:46 +02:00
fix(libsrtp): address PR #1060 review feedback
- config.h: drop three duplicate macro defines (HAVE_STDINT_H, HAVE_SYS_TYPES_H, ERR_REPORTING_STDOUT) - crypto_kernel.c: gate AES-ICM-192 on SOC_AES_SUPPORT_AES_192 instead of unconditional #if 0; ESP32 (only SoC with hw AES-192) now enables the cipher, other SoCs continue to skip it since mbedtls_aes_setkey returns PLATFORM_FEATURE_UNSUPPORTED for 192-bit keys there - examples/get_started/README.md: fix link, repo migrated from idf-extra-components to esp-protocols - LICENSE: prepend dual-license header (Apache-2.0 wrapper + BSD-3-Clause bundled libsrtp), keep Apache full text below
This commit is contained in:
committed by
david-cermak
parent
e5997168d9
commit
04f6448913
@@ -1,3 +1,15 @@
|
||||
This component is dual-licensed:
|
||||
|
||||
- Apache-2.0 — the ESP-IDF wrapper code in this component (port/, include/,
|
||||
Kconfig, CMakeLists.txt, host_test/, examples/). Full text below.
|
||||
|
||||
- BSD-3-Clause — the bundled libsrtp upstream sources under libsrtp/.
|
||||
See libsrtp/LICENSE for the full text.
|
||||
|
||||
Third-party attribution is in NOTICE.
|
||||
|
||||
================================================================================
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# libsrtp — get_started
|
||||
|
||||
Minimal sanity-check application for [`libsrtp`](https://github.com/espressif/idf-extra-components/tree/master/libsrtp). Initializes libsrtp via `srtp_init()` and shuts it down. Used by the repo's CI to verify the component compiles and links across supported targets; also useful as a copy-paste starting point.
|
||||
Minimal sanity-check application for [`libsrtp`](https://github.com/espressif/esp-protocols/tree/master/components/libsrtp). Initializes libsrtp via `srtp_init()` and shuts it down. Used by the repo's CI to verify the component compiles and links across supported targets; also useful as a copy-paste starting point.
|
||||
|
||||
## Build
|
||||
|
||||
|
||||
@@ -67,9 +67,7 @@
|
||||
#define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
|
||||
/* Force SRTP to use system types */
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_UINT64_T 1
|
||||
#define HAVE_UINT32_T 1
|
||||
#define HAVE_UINT16_T 1
|
||||
@@ -82,18 +80,7 @@
|
||||
/* Prevent SRTP from redefining types */
|
||||
#define INTEGERS_H
|
||||
|
||||
/* Prevent srtp_ssrc_t redefinition */
|
||||
#ifdef __XTENSA__
|
||||
#define SRTP_KERNEL_COMPAT
|
||||
#endif
|
||||
|
||||
/* Prevent in_addr_t redefinition */
|
||||
#ifndef _LWIP_INET_H
|
||||
typedef uint32_t in_addr_t;
|
||||
#endif
|
||||
|
||||
#define GCM 1
|
||||
#define MBEDTLS 1
|
||||
#define ERR_REPORTING_STDOUT 1
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
||||
@@ -46,6 +46,10 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#if defined(__has_include) && __has_include("soc/soc_caps.h")
|
||||
#include "soc/soc_caps.h"
|
||||
#endif
|
||||
|
||||
#include "alloc.h"
|
||||
|
||||
#include "crypto_kernel.h"
|
||||
@@ -127,7 +131,12 @@ srtp_err_status_t srtp_crypto_kernel_init(void)
|
||||
return status;
|
||||
}
|
||||
#ifdef GCM
|
||||
#if 0
|
||||
/* AES-ICM-192: only the original ESP32 has SoC AES-192 support
|
||||
* (SOC_AES_SUPPORT_AES_192). On every later SoC the mbedtls port returns
|
||||
* MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED for 192-bit keys (no software
|
||||
* fallback in IDF's mbedtls), so letting libsrtp claim this cipher would
|
||||
* surface as a test failure during the cipher self-tests. */
|
||||
#if defined(SOC_AES_SUPPORT_AES_192) && SOC_AES_SUPPORT_AES_192
|
||||
status = srtp_crypto_kernel_load_cipher_type(&srtp_aes_icm_192,
|
||||
SRTP_AES_ICM_192);
|
||||
if (status) {
|
||||
|
||||
Reference in New Issue
Block a user