mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-09-27 14:15:26 +00:00
sip: calls_sdp_crypto_context_generate_answer() — simplify
This commit is contained in:
parent
c1e6cc2891
commit
0c1214935f
2 changed files with 7 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
if (!attr)
|
||||
return FALSE;
|
||||
|
||||
self->local_crypto_attributes = g_list_append (NULL, attr);
|
||||
|
||||
return update_state (self);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue