Skip to content

Commit

Permalink
Merge pull request #3060 from purecloudlabs/hotfix/fix-qop-value-for-…
Browse files Browse the repository at this point in the history
…md5-hashing

uac_auth: fix qop-value for MD5 hashing
  • Loading branch information
bogdan-iancu committed Apr 18, 2023
2 parents 3f60fda + eee7b96 commit 24ba63a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/uac_auth/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ int do_uac_auth(str *msg_body, str *method, str *uri, struct uac_credential *crd
const struct digest_auth_calc *digest_calc;
str_const cnonce;
str_const nc;
str_const qop;

digest_calc = get_digest_calc(auth->algorithm);
if (digest_calc == NULL) {
Expand Down Expand Up @@ -285,8 +286,13 @@ int do_uac_auth(str *msg_body, str *method, str *uri, struct uac_credential *crd
!(auth->flags&QOP_AUTH), &ha2) != 0)
return (-1);

if (auth->flags & QOP_AUTH) {
qop = str_const_init(QOP_AUTH_STR);
} else {
qop = str_const_init(QOP_AUTHINT_STR);
}
if (digest_calc->response(&ha1, &ha2, str2const(&auth->nonce),
str2const(&auth->qop), &nc, &cnonce, response) != 0)
&qop, &nc, &cnonce, response) != 0)
return (-1);
auth_nc_cnonce->nc = nc;
auth_nc_cnonce->cnonce = cnonce;
Expand Down

0 comments on commit 24ba63a

Please sign in to comment.