Change "md5" algorithm name to uppercase to comply with the standard (#2889)

remotes/origin/oob-rtcp-xr
Riza Sulistyo 3 years ago committed by GitHub
parent ab86ec3dc0
commit cc680d21e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -796,7 +796,7 @@ static pj_status_t cmd_add_account(pj_cli_cmd_val *cval)
acc_cfg.id = cval->argv[1];
acc_cfg.reg_uri = cval->argv[2];
acc_cfg.cred_count = 1;
acc_cfg.cred_info[0].scheme = pj_str("Digest");
acc_cfg.cred_info[0].scheme = pjsip_DIGEST_STR;
acc_cfg.cred_info[0].realm = cval->argv[3];
acc_cfg.cred_info[0].username = cval->argv[4];
acc_cfg.cred_info[0].data_type = 0;

@ -888,7 +888,7 @@ static pj_status_t parse_args(int argc, char *argv[],
case OPT_USERNAME: /* Default authentication user */
cur_acc->cred_info[cur_acc->cred_count].username = pj_str(pj_optarg);
cur_acc->cred_info[cur_acc->cred_count].scheme = pj_str("Digest");
cur_acc->cred_info[cur_acc->cred_count].scheme = pjsip_DIGEST_STR;
break;
case OPT_REALM: /* Default authentication realm. */

@ -1006,7 +1006,7 @@ static void ui_add_account(pjsua_transport_config *rtp_cfg)
acc_cfg.id = pj_str(id);
acc_cfg.reg_uri = pj_str(registrar);
acc_cfg.cred_count = 1;
acc_cfg.cred_info[0].scheme = pj_str("Digest");
acc_cfg.cred_info[0].scheme = pjsip_DIGEST_STR;
acc_cfg.cred_info[0].realm = pj_str(realm);
acc_cfg.cred_info[0].username = pj_str(uname);
acc_cfg.cred_info[0].data_type = 0;

@ -48,6 +48,7 @@
/* Authentication. */
#include <pjsip/sip_auth.h>
#include <pjsip/sip_auth_aka.h>
#include <pjsip/sip_auth_parser.h>
/* Transaction layer. */
#include <pjsip/sip_transaction.h>

@ -65,7 +65,7 @@ extern const pj_str_t pjsip_USERNAME_STR, /**< "username" string const. */
pjsip_DIGEST_STR, /**< "digest" string const. */
pjsip_PGP_STR, /**< "pgp" string const. */
pjsip_BEARER_STR, /**< "bearer" string const. */
pjsip_MD5_STR, /**< "md5" string const. */
pjsip_MD5_STR, /**< "MD5" string const. */
pjsip_SHA256_STR, /**< "SHA-256" string const. */
pjsip_AUTH_STR; /**< "auth" string const. */

@ -802,7 +802,7 @@ PJ_DEF(pj_status_t) pjsip_auth_clt_set_prefs(pjsip_auth_clt_sess *sess,
pj_memcpy(&sess->pref, p, sizeof(*p));
pj_strdup(sess->pool, &sess->pref.algorithm, &p->algorithm);
//if (sess->pref.algorithm.slen == 0)
// sess->pref.algorithm = pj_str("md5");
// sess->pref.algorithm = pj_str("MD5");
return PJ_SUCCESS;
}

@ -60,8 +60,8 @@ const pj_str_t pjsip_USERNAME_STR = { "username", 8 },
pjsip_PGP_STR = { "PGP", 3 },
pjsip_QUOTED_PGP_STR = { "\"PGP\"", 5 },
pjsip_BEARER_STR = { "Bearer", 6 },
pjsip_MD5_STR = { "md5", 3 },
pjsip_QUOTED_MD5_STR = { "\"md5\"", 5},
pjsip_MD5_STR = { "MD5", 3 },
pjsip_QUOTED_MD5_STR = { "\"MD5\"", 5},
pjsip_SHA256_STR = { "SHA-256", 7 },
pjsip_QUOTED_SHA256_STR = { "\"SHA-256\"", 9},
pjsip_AUTH_STR = { "auth", 4},

@ -2830,11 +2830,11 @@ PJ_DEF(pj_status_t) pjsua_acc_set_registration( pjsua_acc_id acc_id,
PJ_UNUSED_ARG(d);
h = pjsip_authorization_hdr_create(tdata->pool);
h->scheme = pj_str("Digest");
h->scheme = pjsip_DIGEST_STR;
h->credential.digest.username = acc->cred[0].username;
h->credential.digest.realm = acc->srv_domain;
h->credential.digest.uri = pj_str(uri);
h->credential.digest.algorithm = pj_str("md5");
h->credential.digest.algorithm = pjsip_MD5_STR;
pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)h);
}

Loading…
Cancel
Save