Support for upstream mbedtls versions 2 and 3 when compiled with SRTP support

Co-authored-by: Thulinma <jaron@vietors.com>
This commit is contained in:
Gijs Peskens 2024-02-22 00:21:15 +01:00 committed by Thulinma
parent 3987cfec3f
commit ebe783666f
7 changed files with 147 additions and 18 deletions

View file

@ -9,8 +9,12 @@
communication. This certificate uses a 2048 bits RSA key.
*/
#include <mbedtls/version.h>
#if MBEDTLS_VERSION_MAJOR > 2
#include <mbedtls/build_info.h>
#else
#include <mbedtls/config.h>
#endif
#include <mbedtls/ctr_drbg.h>
#include <mbedtls/entropy.h>
#include <mbedtls/error.h>
@ -32,4 +36,6 @@ public:
public:
mbedtls_x509_crt cert;
mbedtls_pk_context key; /* key context, stores private and public key. */
private:
mbedtls_ctr_drbg_context rand_ctx;
};