switch_srtp_crypto_suite_t SUITES[CRYPTO_INVALID] = {
{ "AEAD_AES_256_GCM_8", "", AEAD_AES_256_GCM_8, 44, 12},
+ { "AEAD_AES_256_GCM", "", AEAD_AES_256_GCM, 44, 12},
{ "AEAD_AES_128_GCM_8", "", AEAD_AES_128_GCM_8, 28, 12},
+ { "AEAD_AES_128_GCM", "", AEAD_AES_128_GCM, 28, 12},
{ "AES_256_CM_HMAC_SHA1_80", "AES_CM_256_HMAC_SHA1_80", AES_CM_256_HMAC_SHA1_80, 46, 14},
{ "AES_192_CM_HMAC_SHA1_80", "AES_CM_192_HMAC_SHA1_80", AES_CM_192_HMAC_SHA1_80, 38, 14},
{ "AES_CM_128_HMAC_SHA1_80", "", AES_CM_128_HMAC_SHA1_80, 30, 14},
}
break;
+ case AEAD_AES_256_GCM:
+ srtp_crypto_policy_set_aes_gcm_256_16_auth(&policy->rtp);
+ srtp_crypto_policy_set_aes_gcm_256_16_auth(&policy->rtcp);
+
+ if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
+ switch_channel_set_variable(channel, "rtp_has_crypto", "AEAD_AES_256_GCM");
+ }
+ break;
+
case AEAD_AES_128_GCM_8:
srtp_crypto_policy_set_aes_gcm_128_8_auth(&policy->rtp);
srtp_crypto_policy_set_aes_gcm_128_8_auth(&policy->rtcp);
}
break;
+ case AEAD_AES_128_GCM:
+ srtp_crypto_policy_set_aes_gcm_128_16_auth(&policy->rtp);
+ srtp_crypto_policy_set_aes_gcm_128_16_auth(&policy->rtcp);
+
+ if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
+ switch_channel_set_variable(channel, "rtp_has_crypto", "AEAD_AES_128_GCM");
+ }
+ break;
+
case AES_CM_256_HMAC_SHA1_80:
srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy->rtp);
srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(&policy->rtcp);