Asterisk - The Open Source Telephony Project GIT-master-0bf3178
|
#include "asterisk.h"
#include "asterisk/cli.h"
#include "asterisk/sorcery.h"
#include "asterisk/acl.h"
#include "asterisk/stasis.h"
#include "asterisk/security_events.h"
#include "stir_shaken.h"
Go to the source code of this file.
Variables | |
static struct ast_cli_entry | stir_shaken_profile_cli [] |
#define CONFIG_TYPE "profile" |
Definition at line 29 of file profile_config.c.
#define DEFAULT_attest_level attest_level_NOT_SET |
Definition at line 56 of file profile_config.c.
#define DEFAULT_ca_file NULL |
Definition at line 33 of file profile_config.c.
#define DEFAULT_ca_path NULL |
Definition at line 34 of file profile_config.c.
#define DEFAULT_cert_cache_dir NULL |
Definition at line 39 of file profile_config.c.
#define DEFAULT_check_tn_cert_public_url check_tn_cert_public_url_NOT_SET |
Definition at line 53 of file profile_config.c.
#define DEFAULT_crl_file NULL |
Definition at line 35 of file profile_config.c.
#define DEFAULT_crl_path NULL |
Definition at line 36 of file profile_config.c.
#define DEFAULT_curl_timeout 0 |
Definition at line 41 of file profile_config.c.
#define DEFAULT_endpoint_behavior endpoint_behavior_OFF |
Definition at line 31 of file profile_config.c.
#define DEFAULT_load_system_certs load_system_certs_NOT_SET |
Definition at line 51 of file profile_config.c.
#define DEFAULT_max_cache_entry_age 0 |
Definition at line 44 of file profile_config.c.
#define DEFAULT_max_cache_size 0 |
Definition at line 45 of file profile_config.c.
#define DEFAULT_max_date_header_age 0 |
Definition at line 43 of file profile_config.c.
#define DEFAULT_max_iat_age 0 |
Definition at line 42 of file profile_config.c.
#define DEFAULT_private_key_file NULL |
Definition at line 54 of file profile_config.c.
#define DEFAULT_public_cert_url NULL |
Definition at line 55 of file profile_config.c.
#define DEFAULT_relax_x5u_path_restrictions relax_x5u_path_restrictions_NOT_SET |
Definition at line 50 of file profile_config.c.
#define DEFAULT_relax_x5u_port_scheme_restrictions relax_x5u_port_scheme_restrictions_NOT_SET |
Definition at line 49 of file profile_config.c.
#define DEFAULT_send_mky send_mky_NOT_SET |
Definition at line 58 of file profile_config.c.
#define DEFAULT_stir_shaken_failure_action stir_shaken_failure_action_NOT_SET |
Definition at line 47 of file profile_config.c.
#define DEFAULT_unknown_tn_attest_level attest_level_NOT_SET |
Definition at line 57 of file profile_config.c.
#define DEFAULT_untrusted_cert_file NULL |
Definition at line 37 of file profile_config.c.
#define DEFAULT_untrusted_cert_path NULL |
Definition at line 38 of file profile_config.c.
#define DEFAULT_use_rfc9410_responses use_rfc9410_responses_NOT_SET |
Definition at line 48 of file profile_config.c.
|
static |
Definition at line 341 of file profile_config.c.
References a, ao2_cleanup, ast_log, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, config_object_cli_show(), config_object_tab_complete_name(), config_object_type_profile, eprofile_get_all(), eprofile_get_cfg(), LOG_ERROR, NULL, config_object_cli_data::title, and ast_cli_entry::usage.
|
static |
Definition at line 380 of file profile_config.c.
References a, ao2_callback_data, ao2_cleanup, ao2_container_count(), ao2_ref, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, config_object_cli_show(), config_object_type_profile, container, eprofile_get_all(), NULL, OBJ_NODATA, config_object_cli_data::title, and ast_cli_entry::usage.
|
static |
Definition at line 266 of file profile_config.c.
References a, ao2_cleanup, ast_log, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, config_object_cli_show(), config_object_tab_complete_name(), config_object_type_profile, LOG_ERROR, NULL, profile_get_all(), profile_get_cfg(), config_object_cli_data::title, and ast_cli_entry::usage.
|
static |
Definition at line 305 of file profile_config.c.
References a, ao2_callback_data, ao2_cleanup, ao2_container_count(), ao2_ref, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, config_object_cli_show(), config_object_type_profile, container, NULL, OBJ_NODATA, profile_get_all(), config_object_cli_data::title, and ast_cli_entry::usage.
|
static |
Definition at line 134 of file profile_config.c.
References profile_cfg::acfg_common, ao2_cleanup, as_copy_cfg_common(), as_get_cfg(), ast_log, ast_sorcery_alloc(), ast_sorcery_create(), ast_sorcery_object_get_id(), ast_sorcery_objectset_apply(), ast_sorcery_retrieve_by_id(), ast_sorcery_update(), cfg_enum_copy_ex, profile_cfg::endpoint_behavior, profile_cfg::eprofile, get_sorcery(), LOG_ERROR, NULL, RAII_VAR, profile_cfg::unknown_tn_attest_level, profile_cfg::vcfg_common, vs_copy_cfg_common(), and vs_get_cfg().
Referenced by profile_apply().
|
static |
Definition at line 244 of file profile_config.c.
References ast_log, ast_sorcery_object_get_id(), LOG_ERROR, PROFILE_ALLOW_VERIFY, verification_cfg_common::tcs, and profile_cfg::vcfg_common.
Referenced by profile_load().
struct ao2_container * eprofile_get_all | ( | void | ) |
Definition at line 120 of file profile_config.c.
References AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sorcery_retrieve_by_fields(), get_sorcery(), and NULL.
Referenced by cli_eprofile_show(), and cli_eprofile_show_all().
struct profile_cfg * eprofile_get_cfg | ( | const char * | id | ) |
Definition at line 126 of file profile_config.c.
References ast_sorcery_retrieve_by_id(), ast_strlen_zero(), get_sorcery(), and NULL.
Referenced by ast_stir_shaken_as_ctx_create(), ast_stir_shaken_vs_ctx_create(), and cli_eprofile_show().
generate_acfg_common_sorcery_handlers | ( | profile_cfg | ) |
generate_sorcery_enum_from_str | ( | profile_cfg | , |
endpoint_behavior | , | ||
UNKNOWN | |||
) |
generate_sorcery_enum_from_str_ex | ( | profile_cfg | , |
unknown_tn_attest_level | , | ||
attest_level | , | ||
UNKNOWN | |||
) |
generate_sorcery_enum_to_str | ( | profile_cfg | , |
endpoint_behavior | |||
) |
generate_sorcery_enum_to_str_ex | ( | profile_cfg | , |
unknown_tn_attest_level | , | ||
attest_level | |||
) |
generate_vcfg_common_sorcery_handlers | ( | profile_cfg | ) |
|
static |
Definition at line 73 of file profile_config.c.
References profile_cfg::acfg_common, ao2_ref, ast_sorcery_generic_alloc(), ast_string_field_init, NULL, profile_destructor(), and profile_cfg::vcfg_common.
Referenced by profile_load().
|
static |
Definition at line 221 of file profile_config.c.
References profile_cfg::acfg_common, as_check_common_config(), ast_sorcery_object_get_id(), create_effective_profile(), profile_cfg::eprofile, PROFILE_ALLOW_ATTEST, PROFILE_ALLOW_VERIFY, profile_cfg::vcfg_common, and vs_check_common_config().
Referenced by profile_load().
|
static |
Definition at line 60 of file profile_config.c.
References acfg_cleanup(), profile_cfg::acfg_common, ao2_cleanup, ast_string_field_free_memory, profile_cfg::eprofile, vcfg_cleanup(), and profile_cfg::vcfg_common.
Referenced by profile_alloc().
struct ao2_container * profile_get_all | ( | void | ) |
Definition at line 106 of file profile_config.c.
References AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sorcery_retrieve_by_fields(), CONFIG_TYPE, get_sorcery(), and NULL.
Referenced by cli_profile_show(), cli_profile_show_all(), and cli_verify_cert().
struct profile_cfg * profile_get_cfg | ( | const char * | id | ) |
Definition at line 112 of file profile_config.c.
References ast_sorcery_retrieve_by_id(), ast_strlen_zero(), CONFIG_TYPE, get_sorcery(), and NULL.
Referenced by cli_profile_show(), and cli_verify_cert().
int profile_load | ( | void | ) |
Definition at line 439 of file profile_config.c.
References ARRAY_LEN, ast_cli_register_multiple, ast_log, ast_sorcery_apply_default, AST_SORCERY_APPLY_SUCCESS, ast_sorcery_internal_object_register, ast_sorcery_load_object(), ast_sorcery_object_field_register, ast_sorcery_object_field_register_nodoc, ast_sorcery_object_register, CONFIG_TYPE, enum_option_register, enum_option_register_ex, eprofile_apply(), get_sorcery(), LOG_ERROR, NULL, OPT_NOOP_T, profile_alloc(), profile_apply(), register_common_attestation_fields, register_common_verification_fields, sorcery, and stir_shaken_profile_cli.
Referenced by common_config_load().
int profile_reload | ( | void | ) |
Definition at line 423 of file profile_config.c.
References ast_sorcery_force_reload_object(), CONFIG_TYPE, get_sorcery(), and sorcery.
Referenced by common_config_reload().
int profile_unload | ( | void | ) |
Definition at line 431 of file profile_config.c.
References ARRAY_LEN, ast_cli_unregister_multiple(), and stir_shaken_profile_cli.
Referenced by common_config_unload().
|
static |
Definition at line 416 of file profile_config.c.
Referenced by profile_load(), and profile_unload().