mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-06-26 13:49:31 +00:00
sip: calls_sdp_crypto_context_generate_answer() — simplify
This commit is contained in:
parent
c1e6cc2891
commit
0c1214935f
|
@ -468,8 +468,6 @@ calls_sdp_crypto_context_generate_offer (CallsSdpCryptoContext *self)
|
||||||
gboolean
|
gboolean
|
||||||
calls_sdp_crypto_context_generate_answer (CallsSdpCryptoContext *self)
|
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);
|
g_return_val_if_fail (CALLS_IS_SDP_CRYPTO_CONTEXT (self), FALSE);
|
||||||
|
|
||||||
if (self->state != CALLS_CRYPTO_CONTEXT_STATE_OFFER_REMOTE) {
|
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;
|
calls_srtp_crypto_attribute *attr_offer = node->data;
|
||||||
|
|
||||||
if (crypto_attribute_is_supported (self, attr_offer)) {
|
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->crypto_suite = attr_offer->crypto_suite;
|
||||||
attr->tag = attr_offer->tag;
|
attr->tag = attr_offer->tag;
|
||||||
calls_srtp_crypto_attribute_init_keys (attr);
|
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;
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
self->local_crypto_attributes = g_list_append (NULL, attr);
|
|
||||||
|
|
||||||
return update_state (self);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ typedef enum {
|
||||||
CALLS_SRTP_SUITE_UNKNOWN = 0,
|
CALLS_SRTP_SUITE_UNKNOWN = 0,
|
||||||
CALLS_SRTP_SUITE_AES_CM_128_SHA1_32, /* RFC 4568 */
|
CALLS_SRTP_SUITE_AES_CM_128_SHA1_32, /* RFC 4568 */
|
||||||
CALLS_SRTP_SUITE_AES_CM_128_SHA1_80, /* 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_32, /* RFC 6188 not supported by Gst */
|
||||||
CALLS_SRTP_SUITE_AES_192_CM_SHA1_80, /* RFC 6188 not supperted 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_32, /* RFC 6188 */
|
||||||
CALLS_SRTP_SUITE_AES_256_CM_SHA1_80, /* 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 */
|
CALLS_SRTP_SUITE_F8_128_HMAC_SHA1_32, /* RFC 4568 but not supported by GstSrtpEnc/GstSrtpDec */
|
||||||
|
|
Loading…
Reference in a new issue