diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-05-26 12:06:34 -0400 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-05-26 12:06:34 -0400 |
commit | 5e9cd1f20d86de1c25b7a9accffb7d3e2601878b (patch) | |
tree | 6f0b0fb740f41b0761475657087611c563766f10 /res/res_srtp.c | |
parent | d4ccd3a6c088f4d2fefda1a44e4555dd54335cda (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 | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/res/res_srtp.c b/res/res_srtp.c index 97773c125..a76128fde 100644 --- a/res/res_srtp.c +++ b/res/res_srtp.c @@ -39,11 +39,18 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#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/lock.h" |