From 21b64194f268e258fff4c66af4435d112df6708d Mon Sep 17 00:00:00 2001 From: Luis Azedo Date: Mon, 6 Jul 2015 15:50:20 +0100 Subject: [PATCH] pv : add auth digest pseudo variables adn - auth nonce adc - auth cnonce adr - auth response ado - auth opaque --- modules/pv/pv.c | 12 ++++++++++++ modules/pv/pv_core.c | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/modules/pv/pv.c b/modules/pv/pv.c index 11d899a7437..1145f869e30 100644 --- a/modules/pv/pv.c +++ b/modules/pv/pv.c @@ -123,6 +123,18 @@ static pv_export_t mod_pvs[] = { {{"aa", (sizeof("aa")-1)}, /* auth algorithm */ PVT_OTHER, pv_get_authattr, 0, 0, 0, pv_init_iname, 6}, + {{"adn", (sizeof("adn")-1)}, /* auth nonce */ + PVT_OTHER, pv_get_authattr, 0, + 0, 0, pv_init_iname, 7}, + {{"adc", (sizeof("adc")-1)}, /* auth cnonce */ + PVT_OTHER, pv_get_authattr, 0, + 0, 0, pv_init_iname, 8}, + {{"adr", (sizeof("adr")-1)}, /* auth response */ + PVT_OTHER, pv_get_authattr, 0, + 0, 0, pv_init_iname, 9}, + {{"ado", (sizeof("ado")-1)}, /* auth opaque */ + PVT_OTHER, pv_get_authattr, 0, + 0, 0, pv_init_iname, 10}, {{"Au", (sizeof("Au")-1)}, /* */ PVT_OTHER, pv_get_acc_username, 0, 0, 0, pv_init_iname, 1}, diff --git a/modules/pv/pv_core.c b/modules/pv/pv_core.c index 9cbad39b2c4..239858c441a 100644 --- a/modules/pv/pv_core.c +++ b/modules/pv/pv_core.c @@ -1254,6 +1254,18 @@ int pv_get_authattr(struct sip_msg *msg, pv_param_t *param, } switch(param->pvn.u.isname.name.n) { + case 10: + return pv_get_strval(msg, param, res, + &((auth_body_t*)(hdr->parsed))->digest.opaque); + case 9: + return pv_get_strval(msg, param, res, + &((auth_body_t*)(hdr->parsed))->digest.response); + case 8: + return pv_get_strval(msg, param, res, + &((auth_body_t*)(hdr->parsed))->digest.cnonce); + case 7: + return pv_get_strval(msg, param, res, + &((auth_body_t*)(hdr->parsed))->digest.nonce); case 6: return pv_get_strval(msg, param, res, &((auth_body_t*)(hdr->parsed))->digest.alg.alg_str);