]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_srtp: Add support for libsrtp2.1.
authorAlexander Traud <pabstraud@compuserve.com>
Wed, 6 Sep 2017 08:15:26 +0000 (10:15 +0200)
committerAlexander Traud <pabstraud@compuserve.com>
Wed, 6 Sep 2017 08:15:26 +0000 (10:15 +0200)
Asterisk is able to use libSRTP 2.0.x. However since libSRTP 2.1.x, the macro
SRTP_AES_ICM got renamed to SRTP_AES_ICM_128. Beside to still compile with
previous versions of libSRTP, this change allows libSRTP 2.1.x as well.

ASTERISK-27253 #close

Change-Id: I2e6eb3c3bc844fee8a624060a2eb6f182dc70315

res/srtp/srtp_compat.h

index 4ab39f318f2f9f07f3b14164ebbb62daed81ea00..bf420824455420308c7aae129574915b0d431a3a 100644 (file)
@@ -5,7 +5,11 @@
 
 #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 err_status_t srtp_err_status_t