Hack to change password to RES of SIM authentication.
This commit is contained in:
parent
79df5c780d
commit
85a439080c
|
@ -4198,4 +4198,6 @@ const int ast_sip_hangup_sip2cause(int cause);
|
|||
*/
|
||||
int ast_sip_str2rc(const char *name);
|
||||
|
||||
extern unsigned char *volte_auth;
|
||||
|
||||
#endif /* _RES_PJSIP_H */
|
||||
|
|
|
@ -4095,3 +4095,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_
|
|||
.requires = "dnsmgr,res_pjproject,res_sorcery_config,res_sorcery_memory,res_sorcery_astdb",
|
||||
.optional_modules = "res_geolocation,res_statsd",
|
||||
);
|
||||
|
||||
unsigned char *volte_auth = NULL;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
LINKER_SYMBOL_PREFIXast_copy_pj_str;
|
||||
LINKER_SYMBOL_PREFIXast_copy_pj_str2;
|
||||
LINKER_SYMBOL_PREFIXast_pjsip_rdata_get_endpoint;
|
||||
LINKER_SYMBOL_PREFIXvolte_auth;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
|
|
@ -33,7 +33,9 @@
|
|||
#include "asterisk/vector.h"
|
||||
|
||||
pj_str_t supported_digest_algorithms[] = {
|
||||
{ "MD5", 3}
|
||||
{ "MD5", 3},
|
||||
{ "AKAv1-MD5", 9},
|
||||
{ "AKAv2-MD5", 9}
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -311,7 +313,10 @@ static pj_status_t set_outbound_authentication_credentials(pjsip_auth_clt_sess *
|
|||
pj_cstr(&auth_cred.scheme, "digest");
|
||||
switch (auth->type) {
|
||||
case AST_SIP_AUTH_TYPE_USER_PASS:
|
||||
pj_cstr(&auth_cred.data, auth->auth_pass);
|
||||
if (volte_auth)
|
||||
pj_strset(&auth_cred.data, (char *)volte_auth, 8);
|
||||
else
|
||||
pj_cstr(&auth_cred.data, auth->auth_pass);
|
||||
auth_cred.data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
|
||||
break;
|
||||
case AST_SIP_AUTH_TYPE_MD5:
|
||||
|
@ -358,6 +363,7 @@ static pj_status_t set_outbound_authentication_credentials(pjsip_auth_clt_sess *
|
|||
}
|
||||
|
||||
if (AST_VECTOR_SIZE(&auth_creds) == 0) {
|
||||
puts("jolly: hier");
|
||||
/* No matching auth objects were found. */
|
||||
res = PJSIP_ENOCREDENTIAL;
|
||||
goto cleanup;
|
||||
|
|
Loading…
Reference in New Issue