1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-05-18 02:59:27 +00:00

Merge branch 'sip_calls_sdp_crypto_context_generate_answer_simplify' into 'main'

sip: calls_sdp_crypto_context_generate_answer() — simplify

See merge request GNOME/calls!722
This commit is contained in:
Дилян Палаузов 2024-04-18 12:47:03 +00:00
commit c6de4dce3f
2 changed files with 7 additions and 12 deletions

View file

@ -468,8 +468,6 @@ calls_sdp_crypto_context_generate_offer (CallsSdpCryptoContext *self)
gboolean
calls_sdp_crypto_context_generate_answer (CallsSdpCryptoContext *self)
{
calls_srtp_crypto_attribute *attr = NULL;
g_return_val_if_fail (CALLS_IS_SDP_CRYPTO_CONTEXT (self), FALSE);
if (self->state != CALLS_CRYPTO_CONTEXT_STATE_OFFER_REMOTE) {
@ -482,20 +480,17 @@ calls_sdp_crypto_context_generate_answer (CallsSdpCryptoContext *self)
calls_srtp_crypto_attribute *attr_offer = node->data;
if (crypto_attribute_is_supported (self, attr_offer)) {
attr = calls_srtp_crypto_attribute_new (1);
calls_srtp_crypto_attribute *attr = calls_srtp_crypto_attribute_new (1);
attr->crypto_suite = attr_offer->crypto_suite;
attr->tag = attr_offer->tag;
calls_srtp_crypto_attribute_init_keys (attr);
break;
self->local_crypto_attributes = g_list_append (NULL, attr);
return update_state (self);
}
}
if (!attr)
return FALSE;
self->local_crypto_attributes = g_list_append (NULL, attr);
return update_state (self);
return FALSE;
}

View file

@ -32,8 +32,8 @@ typedef enum {
CALLS_SRTP_SUITE_UNKNOWN = 0,
CALLS_SRTP_SUITE_AES_CM_128_SHA1_32, /* RFC 4568 */
CALLS_SRTP_SUITE_AES_CM_128_SHA1_80, /* RFC 4568 */
CALLS_SRTP_SUITE_AES_192_CM_SHA1_32, /* RFC 6188 not supperted by Gst */
CALLS_SRTP_SUITE_AES_192_CM_SHA1_80, /* RFC 6188 not supperted by Gst */
CALLS_SRTP_SUITE_AES_192_CM_SHA1_32, /* RFC 6188 not supported by Gst */
CALLS_SRTP_SUITE_AES_192_CM_SHA1_80, /* RFC 6188 not supported by Gst */
CALLS_SRTP_SUITE_AES_256_CM_SHA1_32, /* RFC 6188 */
CALLS_SRTP_SUITE_AES_256_CM_SHA1_80, /* RFC 6188 */
CALLS_SRTP_SUITE_F8_128_HMAC_SHA1_32, /* RFC 4568 but not supported by GstSrtpEnc/GstSrtpDec */