Commit 15b69b09 authored by Pekka Pessi's avatar Pekka Pessi

nua: removed unupported smime hooks

darcs-hash:20061001144423-65a35-e9795d4aacbbaf85999d72237da67f5d6734dcd2.gz
parent 5f161178
......@@ -77,37 +77,6 @@ nua_stack_message(nua_t *nua, nua_handle_t *nh, nua_event_t e, tagi_t const *tag
TAG_NEXT(tags));
sip = sip_object(msg);
#if HAVE_SOFIA_SMIME_OLD
if (sip) {
int status, bOverride;
sm_option_t sm_opt;
tl_gets(tags,
NUTAG_SMIME_ENABLE_REF(bOverride),
NUTAG_SMIME_OPT_REF(sm_opt),
TAG_END());
if (nua->sm->sm_enable && sm_opt != SM_ID_NULL) {
status = sm_adapt_message(nua->sm, msg, sip,
bOverride? sm_opt : SM_ID_NULL);
switch(status)
{
case SM_SUCCESS:
break;
case SM_ERROR:
return UA_EVENT2(e, SIP_500_INTERNAL_SERVER_ERROR);
case SM_CERT_NOTFOUND:
case SM_CERTFILE_NOTFOUND:
/* currently just sent a sending fail signal, later on,
should trigger the options message to ask for
certificate. */
msg_destroy(msg);
return UA_EVENT2(e, SIP_500_INTERNAL_SERVER_ERROR);
}
}
}
#endif
if (sip)
cr->cr_orq = nta_outgoing_mcreate(nua->nua_nta,
process_response_to_message, nh, NULL,
......@@ -153,25 +122,6 @@ int nua_stack_process_message(nua_t *nua,
msg = nta_incoming_getrequest(irq);
#if HAVE_SOFIA_SMIME
if (nua->sm->sm_enable) {
int sm_status = sm_decode_message(nua->sm, msg, sip);
switch (sm_status) {
case SM_SMIME_DISABLED:
msg_destroy(msg);
return 493;
case SM_SUCCESS:
break;
case SM_ERROR:
msg_destroy(msg);
return 493;
default:
break;
}
}
#endif
nua_stack_event(nh->nh_nua, nh, msg, nua_i_message, SIP_200_OK, TAG_END());
#if 0 /* XXX */
......
......@@ -585,30 +585,6 @@ static int process_response_to_invite(nua_handle_t *nh,
assert(du);
#if HAVE_SOFIA_SMIME
if (status < 300) {
int sm_status;
msg_t *response;
/* decrypt sdp payload if it's S/MIME */
/* XXX msg had a problem!!?? */
response = nta_outgoing_getresponse(orq);
sm_status = sm_decode_message(nua->sm, response, sip);
switch (sm_status) {
case SM_SMIME_DISABLED:
case SM_ERROR:
status = 493, phrase = "Undecipherable";
break;
case SM_SUCCESS:
break;
default:
break;
}
}
#endif
if (status < 300 && !ss->ss_usage) /* Usage is now established */
ss->ss_usage = du;
......@@ -1291,23 +1267,6 @@ int process_invite1(nua_t *nua,
size_t len;
char const *user_agent = NH_PGET(nh0, user_agent);
#if HAVE_SOFIA_SMIME
int sm_status;
sm_status = sm_decode_message(nua->sm, msg, sip);
switch(sm_status) {
case SM_SMIME_DISABLED:
case SM_ERROR:
nta_incoming_treply(irq, 493, "Undecipherable", TAG_END());
return 493;
case SM_SUCCESS:
break;
default:
break;
}
#endif
if (nh0->nh_soa) {
/* Make sure caller uses application/sdp without compression */
if (nta_check_session_content(irq, sip,
......@@ -1606,26 +1565,6 @@ void respond_to_invite(nua_t *nua, nua_handle_t *nh,
if (ss->ss_refresher && 200 <= status && status < 300)
use_session_timer(nh, 1, msg, sip);
#if HAVE_SOFIA_SMIME
if (nua->sm->sm_enable && sdp) {
int sm_status;
sm_status = sm_encode_message(nua->sm, msg, sip, SM_ID_NULL);
switch (sm_status) {
case SM_SUCCESS:
break;
case SM_ERROR:
status = 500, phrase = "S/MIME processing error";
break;
case SM_CERT_NOTFOUND:
case SM_CERTFILE_NOTFOUND:
status = 500, phrase = "S/MIME certificate error";
break;
}
}
#endif
if (reliable && status < 200) {
nta_reliable_t *rel;
rel = nta_reliable_mreply(ss->ss_srequest->sr_irq,
......
......@@ -1461,11 +1461,8 @@ int nua_creq_check_restart(nua_handle_t *nh,
SU_DEBUG_5(("nua(%p): auc_authorization failed\n", nh));
}
}
#if HAVE_SOFIA_SMIME
else if (status == 493) /* try detached signature */
;
#endif
else if (status == 422 && method == sip_method_invite) {
if (status == 422 && method == sip_method_invite) {
if (sip->sip_min_se && nh->nh_ss->ss_min_se < sip->sip_min_se->min_delta)
nh->nh_ss->ss_min_se = sip->sip_min_se->min_delta;
if (nh->nh_ss->ss_min_se > nh->nh_ss->ss_session_timer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment