mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-07 13:49:18 +00:00
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
34 lines
1.2 KiB
C
34 lines
1.2 KiB
C
#ifndef AST_SRTP_COMPAT_H
|
|
#define AST_SRTP_COMPAT_H
|
|
|
|
/* Compatibility for libsrtp 2.x */
|
|
|
|
#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
|
|
#define err_status_ok srtp_err_status_ok
|
|
#define err_status_fail srtp_err_status_fail
|
|
#define err_status_bad_param srtp_err_status_bad_param
|
|
#define err_status_alloc_fail srtp_err_status_alloc_fail
|
|
#define err_status_dealloc_fail srtp_err_status_dealloc_fail
|
|
#define err_status_init_fail srtp_err_status_init_fail
|
|
#define err_status_terminus srtp_err_status_terminus
|
|
#define err_status_auth_fail srtp_err_status_auth_fail
|
|
#define err_status_cipher_fail srtp_err_status_cipher_fail
|
|
#define err_status_replay_fail srtp_err_status_replay_fail
|
|
#define err_status_replay_old srtp_err_status_replay_old
|
|
#define err_status_algo_fail srtp_err_status_algo_fail
|
|
#define err_status_no_such_op srtp_err_status_no_such_op
|
|
#define err_status_no_ctx srtp_err_status_no_ctx
|
|
#define err_status_cant_check srtp_err_status_cant_check
|
|
#define err_status_key_expired srtp_err_status_key_expired
|
|
|
|
#endif /* AST_SRTP_COMPAT_H */
|