Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#529 uac_registrant does not register (state 6)

1.7.x
closed-fixed
Ovidiu Sas
modules (454)
5
2012-05-30
2012-05-27
Anonymous
No

uac_register doeas not register at Nortel softswitch(state=6).

Discussion

  • Ovidiu Sas
    Ovidiu Sas
    2012-05-28

    The problem here is related to the fact that opensips is able to perform only 'auth' authentication. When authentication is performed through the uac_auth api, the qop param is not checked and a blind 'auth' authentication is performed assuming that qop is set to auth.
    In this particular case, the received qop is set to 'auth,auth-int' and an 'auth' authentication is performed, but when the hash is calculated, the value of qop is taken as is instead of using only 'auth', which leads to a wrong hash.
    The following patch fixes the problem, but is only a hack. The true fix would be to parse the qop and extract only the supported values out of it.

    $ svn diff modules/uac_auth/
    Index: modules/uac_auth/auth.c
    ===================================================================
    --- modules/uac_auth/auth.c (revision 9051)
    +++ modules/uac_auth/auth.c (working copy)
    @@ -306,7 +306,7 @@
    MD5Update(&Md5Ctx, ":", 1);
    MD5Update(&Md5Ctx, cnonce->s, cnonce->len);
    MD5Update(&Md5Ctx, ":", 1);
    - MD5Update(&Md5Ctx, auth->qop.s, auth->qop.len);
    + MD5Update(&Md5Ctx, "auth", 4);
    MD5Update(&Md5Ctx, ":", 1);
    };
    MD5Update(&Md5Ctx, ha2, HASHHEXLEN);

     
    • assigned_to: nobody --> osas
     
  • Ovidiu Sas
    Ovidiu Sas
    2012-05-30

    fixed in 1.7, 1.8 and trunk

     
  • Ovidiu Sas
    Ovidiu Sas
    2012-05-30

    • status: open --> closed-fixed