Asterisk - The Open Source Telephony Project GIT-master-7e7a603
srtp_compat.h
Go to the documentation of this file.
1#ifndef AST_SRTP_COMPAT_H
2#define AST_SRTP_COMPAT_H
3
4/* Compatibility for libsrtp 2.x */
5
6#define crypto_policy_t srtp_crypto_policy_t
7
8#define crypto_policy_set_aes_cm_128_hmac_sha1_80 srtp_crypto_policy_set_aes_cm_128_hmac_sha1_80
9#define crypto_policy_set_aes_cm_128_hmac_sha1_32 srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32
10#define crypto_policy_set_aes_cm_192_hmac_sha1_80 srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80
11#define crypto_policy_set_aes_cm_192_hmac_sha1_32 srtp_crypto_policy_set_aes_cm_192_hmac_sha1_32
12#define crypto_policy_set_aes_cm_256_hmac_sha1_80 srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80
13#define crypto_policy_set_aes_cm_256_hmac_sha1_32 srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32
14#define crypto_policy_set_aes_gcm_128_16_auth srtp_crypto_policy_set_aes_gcm_128_16_auth
15#define crypto_policy_set_aes_gcm_256_16_auth srtp_crypto_policy_set_aes_gcm_256_16_auth
16#define crypto_policy_set_aes_gcm_128_8_auth srtp_crypto_policy_set_aes_gcm_128_8_auth
17#define crypto_policy_set_aes_gcm_256_8_auth srtp_crypto_policy_set_aes_gcm_256_8_auth
18
19#if defined(SRTP_AES_GCM_128_KEY_LEN_WSALT)
20#define AES_128_GCM_KEYSIZE_WSALT SRTP_AES_GCM_128_KEY_LEN_WSALT
21#else
22#define AES_128_GCM_KEYSIZE_WSALT SRTP_AES_128_GCM_KEYSIZE_WSALT
23#endif
24
25#if defined(SRTP_AES_GCM_256_KEY_LEN_WSALT)
26#define AES_256_GCM_KEYSIZE_WSALT SRTP_AES_GCM_256_KEY_LEN_WSALT
27#else
28#define AES_256_GCM_KEYSIZE_WSALT SRTP_AES_256_GCM_KEYSIZE_WSALT
29#endif
30
31#define err_status_t srtp_err_status_t
32#define err_status_ok srtp_err_status_ok
33#define err_status_fail srtp_err_status_fail
34#define err_status_bad_param srtp_err_status_bad_param
35#define err_status_alloc_fail srtp_err_status_alloc_fail
36#define err_status_dealloc_fail srtp_err_status_dealloc_fail
37#define err_status_init_fail srtp_err_status_init_fail
38#define err_status_terminus srtp_err_status_terminus
39#define err_status_auth_fail srtp_err_status_auth_fail
40#define err_status_cipher_fail srtp_err_status_cipher_fail
41#define err_status_replay_fail srtp_err_status_replay_fail
42#define err_status_replay_old srtp_err_status_replay_old
43#define err_status_algo_fail srtp_err_status_algo_fail
44#define err_status_no_such_op srtp_err_status_no_such_op
45#define err_status_no_ctx srtp_err_status_no_ctx
46#define err_status_cant_check srtp_err_status_cant_check
47#define err_status_key_expired srtp_err_status_key_expired
48
49#endif /* AST_SRTP_COMPAT_H */