HACK: force sec-agree to use doubango against a P-CSCF

laforge/wip
Harald Welte 7 months ago
parent 2c45b360d8
commit 6f991614e8
  1. 3
      tinyDEMO/common.c
  2. 2
      tinySIP/src/dialogs/tsip_dialog_register.c
  3. 5
      tinySIP/src/transports/tsip_transport_ipsec.c
  4. 3
      tinySIP/src/tsip.c

@ -153,6 +153,9 @@ static tsk_object_t* ctx_ctor(tsk_object_t * self, va_list * app)
/* stack */
ctx->stack = tsip_stack_create(stack_callback, DEFAULT_REALM, DEFAULT_IMPI, DEFAULT_IMPU, /* Mandatory parameters */
TSIP_STACK_SET_LOCAL_IP(DEFAULT_LOCAL_IP), /* local IP */
TSIP_STACK_SET_SECAGREE_IPSEC_2("TCP", tsk_true),
TSIP_STACK_SET_IMS_AKA_OPERATOR_ID("22b3156098e11e177e93711d6cb0e688"),
TSIP_STACK_SET_IMS_AKA_AMF(0x8000),
TSIP_STACK_SET_NULL() /* Mandatory */);
/* SIP Sessions */

@ -348,7 +348,7 @@ int tsip_dialog_register_send_REGISTER(tsip_dialog_register_t *self, tsk_bool_t
1) if GRUU is supported, the option-tag "gruu"; and
2) if multiple registrations is supported, the option-tag "outbound".
*/
TSIP_MESSAGE_ADD_HEADER(request, TSIP_HEADER_SUPPORTED_VA_ARGS("path"));
TSIP_MESSAGE_ADD_HEADER(request, TSIP_HEADER_SUPPORTED_VA_ARGS("path,sec-agree"));
//if(1==2/* gruu*/){
//}
//else if(2 == 3 /* multiple registrations */){

@ -257,6 +257,11 @@ int tsip_transport_ipsec_updateMSG(tsip_transport_ipsec_t* self, tsip_message_t
if (!asso || !asso->ctx) {
TSK_DEBUG_ERROR("No IPSec association found.");
ret = -2;
if (TSIP_REQUEST_IS_REGISTER(msg)) {
TSIP_MESSAGE_ADD_HEADER(msg, TSIP_HEADER_REQUIRE_VA_ARGS("sec-agree"));
TSIP_MESSAGE_ADD_HEADER(msg, TSIP_HEADER_PROXY_REQUIRE_VA_ARGS("sec-agree"));
ret = 0;
}
goto bail;
}

@ -689,6 +689,9 @@ int tsip_stack_start(tsip_stack_handle_t *self)
}
}
TSK_DEBUG_INFO("secagree_mech=%s\n", stack->security.secagree_mech);
stack->security.enable_secagree_ipsec = tsk_true;
TSK_DEBUG_INFO("enable_secagree_ipsec=%d\n", stack->security.enable_secagree_ipsec);
/* === Transport type === */
if(!tsk_strnullORempty(stack->security.secagree_mech)) {
if(tsk_striequals(stack->security.secagree_mech, "ipsec-3gpp") && stack->security.enable_secagree_ipsec) {

Loading…
Cancel
Save