]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_srtp: Add support for libsrtp2.x on openSUSE.
authorAlexander Traud <pabstraud@compuserve.com>
Mon, 12 Mar 2018 09:22:43 +0000 (10:22 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Mon, 12 Mar 2018 09:22:43 +0000 (10:22 +0100)
Since ASTERISK-26976, libSRTP 2.x can be used for sRTP. However, that change
added a private header which is not available on openSUSE for example. To
remain compatibility with very old libSRTP versions, the affected/missing
symbols AES_128_ICM and HMAC_SHA1 are defined manually.

ASTERISK-27733

Change-Id: I25c5cb8fa966043d1506ebef449e5a724412b4b6

res/res_srtp.c
res/srtp/srtp_compat.h

index 773d533166e02b2a95fa80d8207ab0aeaf918f7a..f3f8999c699aa7184cd9da17b6e2dc5aab38425e 100644 (file)
@@ -41,7 +41,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #if HAVE_SRTP_VERSION > 1
 # include <srtp2/srtp.h>
-# include <srtp2/crypto_types.h>
 # include "srtp/srtp_compat.h"
 # include <openssl/rand.h>
 #else
index bf420824455420308c7aae129574915b0d431a3a..a7f94c6890db443d418e5d9b24566b97736e933c 100644 (file)
@@ -5,12 +5,8 @@
 
 #define crypto_policy_t srtp_crypto_policy_t
 
-#if defined(SRTP_AES_ICM_128)
-#define AES_128_ICM SRTP_AES_ICM_128
-#else
-#define AES_128_ICM SRTP_AES_ICM
-#endif
-#define HMAC_SHA1 SRTP_HMAC_SHA1
+#define AES_128_ICM 1
+#define HMAC_SHA1 3
 
 #define err_status_t srtp_err_status_t
 #define err_status_ok srtp_err_status_ok