2008/12/31 Andrew Rechenberg Lists <flux...@resurgent.com>:
> I'm trying to send an NTLM Authorization header to a Microsoft Office
> Communications Server 2007 and my code is getting a EXC_BAD_ACCESS in
> ca_credentials when using the macro AUTH_CLIENT_IS_EXTENDED.  This
> function seems to be called indirectly when I use nua_authenticate.

As far as I can recall the NTLM code is just copied from the digest
code but there is actually no real functionality there.. It should
probably be deactivated, or better, completed...

> Here's my auth code:
>
> const char *scheme, *realm;
> char auth[256];
>
> scheme = sip->sip_www_authenticate->au_scheme;
> realm = msg_params_find(sip_www_authenticate->au_params, "realm=");
>
> sprint(auth, "%s:%s:%s:%s", scheme, realm, "test", "test");
>
> nua_authenticate(nh, NUTAG_AUTH(auth), TAG_END());
>
> Looking at the source for the AUTH_CLIENT_IS_EXTENDED macro it is
> checking for ca->ca_auc->auc_plugin_size and when I step through my code
> in the debugger, ca_auc is nil (0x0) so I think that's why the program
> bombs.
>
> Is ca_auc not getting set because the au_scheme is NTLM?

Looks like that is the case.

> Where is ca set?

Looks like auth_client.c::ca_create() creates a dummy ca structure
with NULL ca_auc field.

> Can I create my own authorization header with SIPTAG_AUTHORIZATION_STR
> and re-run nua_register with the same handle?  I've tried that in my
> nua_r_register handler and my code just hangs and a REGISTER is never
> re-sent to the server.

I'm afraid if the server returns just an unknown authentication scheme
it makes the handle unusable. The
auc_challenge()/auc_credentials()/nua_authenticate() API is not very
well thought out for such a case. ;-/

-- 
Pekka.Pessi mail at nokia.com

------------------------------------------------------------------------------
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to