| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
PJSIP UAC Authentication. More...
#include "asterisk.h"#include <pjsip.h>#include "asterisk/res_pjsip.h"#include "asterisk/logger.h"#include "asterisk/module.h"#include "asterisk/strings.h"#include "asterisk/vector.h"
Go to the source code of this file.
| Data Structures | |
| struct | cred_info_vector | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| static int | digest_create_request_with_auth (const struct ast_sip_auth_vector *auth_ids_vector, pjsip_rx_data *challenge, pjsip_tx_data *old_request, pjsip_tx_data **new_request) | 
| static pjsip_hdr_e | get_auth_search_type (pjsip_rx_data *challenge) | 
| static void | get_creds_for_header (const char *id, const char *src_name, pjsip_www_authenticate_hdr *auth_hdr, size_t auth_object_count, const struct ast_sip_auth_objects_vector *auth_objects_vector, struct cred_info_vector *auth_creds, struct ast_str **realms) | 
| Get credentials (if any) from auth objects for a WWW/Proxy-Authenticate header. | |
| static const pjsip_auth_algorithm * | get_supported_algorithm (pjsip_www_authenticate_hdr *auth_hdr) | 
| static int | load_module (void) | 
| static pj_status_t | set_auth_creds (const char *id, pjsip_auth_clt_sess *auth_sess, const struct ast_sip_auth_objects_vector *auth_objects_vector, pjsip_rx_data *challenge, struct ast_str **realms) | 
| static int | unload_module (void) | 
| Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "PJSIP authentication resource" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND, .requires = "res_pjsip", } | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| static struct ast_sip_outbound_authenticator | digest_authenticator | 
PJSIP UAC Authentication.
This module handles authentication when Asterisk is the UAC.
Definition in file res_pjsip_outbound_authenticator_digest.c.
| 
 | static | 
Definition at line 684 of file res_pjsip_outbound_authenticator_digest.c.
| 
 | static | 
Definition at line 684 of file res_pjsip_outbound_authenticator_digest.c.
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 684 of file res_pjsip_outbound_authenticator_digest.c.
| 
 | static | 
Definition at line 470 of file res_pjsip_outbound_authenticator_digest.c.
References ao2_cleanup, ast_alloca, ast_assert, ast_free, ast_log, ast_sip_cleanup_auth_objects_vector, ast_sip_dialog_get_endpoint(), ast_sip_get_pjsip_endpoint(), ast_sip_retrieve_auths_vector(), ast_sorcery_object_get_id(), ast_str_buffer(), ast_str_create, ast_strdupa, ast_trace, AST_VECTOR_FREE, AST_VECTOR_INIT, AST_VECTOR_SIZE, challenge(), cleanup(), LOG_ERROR, LOG_WARNING, NULL, SCOPE_CALL_WITH_RESULT, SCOPE_ENTER, SCOPE_EXIT_LOG_RTN_VALUE, SCOPE_EXIT_RTN_VALUE, set_auth_creds(), and status.
| 
 | static | 
Definition at line 50 of file res_pjsip_outbound_authenticator_digest.c.
References ast_log, challenge(), and LOG_ERROR.
Referenced by set_auth_creds().
| 
 | static | 
Get credentials (if any) from auth objects for a WWW/Proxy-Authenticate header.
| id | For logging | 
| src_name | For logging | 
| auth_hdr | The *-Authenticate header to check | 
| auth_object_count | The number of auth objects available | 
| auth_objects_vector | The vector of available auth objects | 
| auth_creds | The vector to store the credentials in | 
| realms | For logging | 
Definition at line 98 of file res_pjsip_outbound_authenticator_digest.c.
References pjsip_auth_algorithm::algorithm_type, ast_sip_auth_get_creds(), ast_sip_auth_is_algorithm_available(), ast_sorcery_object_get_id(), ast_str_append(), ast_strings_equal(), ast_strlen_zero(), ast_trace, AST_VECTOR_APPEND, AST_VECTOR_GET, AST_VECTOR_SIZE, ast_sip_auth::auth_user, get_supported_algorithm(), pjsip_auth_algorithm::iana_name, NULL, PJSTR_PRINTF_SPEC, PJSTR_PRINTF_VAR, ast_sip_auth::realm, SCOPE_CALL_WITH_RESULT, SCOPE_ENTER, SCOPE_EXIT, SCOPE_EXIT_EXPR, SCOPE_EXIT_RTN, and ast_sip_auth::supported_algorithms_uac.
Referenced by set_auth_creds().
| 
 | static | 
Definition at line 69 of file res_pjsip_outbound_authenticator_digest.c.
References pjsip_auth_algorithm::algorithm_type, ast_sip_auth_get_algorithm_by_iana_name(), ast_sip_auth_is_algorithm_supported(), and NULL.
Referenced by get_creds_for_header().
| 
 | static | 
Definition at line 664 of file res_pjsip_outbound_authenticator_digest.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_sip_register_outbound_authenticator(), and digest_authenticator.
| 
 | static | 
Definition at line 339 of file res_pjsip_outbound_authenticator_digest.c.
References ast_alloca, ast_free, ast_str_strlen(), ast_str_truncate(), AST_VECTOR_FREE, AST_VECTOR_INIT, AST_VECTOR_SIZE, AST_VECTOR_STEAL_ELEMENTS, challenge(), cleanup(), get_auth_search_type(), get_creds_for_header(), NULL, S_OR, SCOPE_ENTER, and SCOPE_EXIT_RTN_VALUE.
Referenced by digest_create_request_with_auth().
| 
 | static | 
Definition at line 672 of file res_pjsip_outbound_authenticator_digest.c.
References ast_sip_unregister_outbound_authenticator(), and digest_authenticator.
| 
 | static | 
Definition at line 684 of file res_pjsip_outbound_authenticator_digest.c.
| 
 | static | 
Definition at line 684 of file res_pjsip_outbound_authenticator_digest.c.
| 
 | static | 
Definition at line 660 of file res_pjsip_outbound_authenticator_digest.c.
Referenced by load_module(), and unload_module().