diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-05-26 12:15:42 -0400 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-05-26 12:15:42 -0400 |
commit | 1f136fe8859c8c4b42e9608bab01eab45d549a55 (patch) | |
tree | 5c0d039823cf208ee990da7f063f172f90fa621e /res/res_srtp.c | |
parent | 56b6a71548c1c0ca8f187f245ccb0c41c8569457 (diff) |
res_srtp: Add support for libsrtp2
ASTERISK-25294 #close
Reported by: Tzafrir Cohen
ASTERISK-26976 #close
Reported by: Alex
Change-Id: I789b1c3d1ed31365bbd9339fa58ef36f48833c40
Diffstat (limited to 'res/res_srtp.c')
-rw-r--r-- | res/res_srtp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/res/res_srtp.c b/res/res_srtp.c index c47a8d55e..caedfb6c8 100644 --- a/res/res_srtp.c +++ b/res/res_srtp.c @@ -38,11 +38,19 @@ #include "asterisk.h" /* for NULL, size_t, memcpy, etc */ #include <math.h> /* for pow */ -#include <srtp/srtp.h> -#ifdef HAVE_OPENSSL -#include <openssl/rand.h> + +#if HAVE_SRTP_VERSION > 1 +# include <srtp2/srtp.h> +# include <srtp2/crypto_types.h> +# include "srtp/srtp_compat.h" +# include <openssl/rand.h> #else -#include <srtp/crypto_kernel.h> +# include <srtp/srtp.h> +# ifdef HAVE_OPENSSL +# include <openssl/rand.h> +# else +# include <srtp/crypto_kernel.h> +# endif #endif #include "asterisk/astobj2.h" /* for ao2_t_ref, etc */ |