Asterisk - The Open Source Telephony Project
18.5.0
|
#include "asterisk.h"
#include <sys/stat.h>
#include "asterisk/cli.h"
#include "asterisk/sorcery.h"
#include "stir_shaken.h"
#include "store.h"
#include "asterisk/res_stir_shaken.h"
Go to the source code of this file.
Data Structures | |
struct | stir_shaken_store |
Macros | |
#define | CONFIG_TYPE "store" |
#define | VARIABLE_SUBSTITUTE "${CERTIFICATE}" |
Functions | |
static int | on_load_path (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | on_load_public_cert_url (const struct aco_option *opt, struct ast_variable *var, void *obj) |
static int | path_to_str (const void *obj, const intptr_t *args, char **buf) |
static int | public_cert_url_to_str (const void *obj, const intptr_t *args, char **buf) |
static void * | stir_shaken_store_alloc (const char *name) |
static int | stir_shaken_store_apply (const struct ast_sorcery *sorcery, void *obj) |
static void | stir_shaken_store_destructor (void *obj) |
static struct stir_shaken_store * | stir_shaken_store_get (const char *id) |
static struct ao2_container * | stir_shaken_store_get_all (void) |
int | stir_shaken_store_load (void) |
Load time initialization for the stir/shaken 'store' configuration. More... | |
static char * | stir_shaken_store_show (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
int | stir_shaken_store_unload (void) |
Unload time cleanup for the stir/shaken 'store' configuration. More... | |
Variables | |
static struct ast_cli_entry | stir_shaken_store_cli [] |
#define CONFIG_TYPE "store" |
Definition at line 30 of file store.c.
Referenced by stir_shaken_store_get(), stir_shaken_store_get_all(), and stir_shaken_store_load().
#define VARIABLE_SUBSTITUTE "${CERTIFICATE}" |
Definition at line 32 of file store.c.
Referenced by on_load_public_cert_url().
|
static |
Definition at line 118 of file store.c.
References ast_log, ast_string_field_set, LOG_ERROR, stir_shaken_store::path, and ast_variable::value.
Referenced by stir_shaken_store_load().
|
static |
Definition at line 145 of file store.c.
References ast_begins_with(), ast_log, ast_string_field_set, LOG_ERROR, stir_shaken_store::public_cert_url, ast_variable::value, and VARIABLE_SUBSTITUTE.
Referenced by stir_shaken_store_load().
|
static |
Definition at line 136 of file store.c.
References ast_strdup, and stir_shaken_store::path.
Referenced by stir_shaken_store_load().
|
static |
Definition at line 163 of file store.c.
References ast_strdup, and stir_shaken_store::public_cert_url.
Referenced by stir_shaken_store_load().
|
static |
Definition at line 62 of file store.c.
References ao2_ref, ast_sorcery_generic_alloc(), ast_string_field_init, NULL, and stir_shaken_store_destructor().
Referenced by stir_shaken_store_load().
|
static |
Definition at line 79 of file store.c.
Referenced by stir_shaken_store_load().
|
static |
Definition at line 55 of file store.c.
References ast_string_field_free_memory.
Referenced by stir_shaken_store_alloc().
|
static |
Definition at line 44 of file store.c.
References ast_sorcery_retrieve_by_id(), ast_stir_shaken_sorcery(), and CONFIG_TYPE.
Referenced by stir_shaken_store_show().
|
static |
Definition at line 49 of file store.c.
References AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sorcery_retrieve_by_fields(), ast_stir_shaken_sorcery(), CONFIG_TYPE, and NULL.
Referenced by stir_shaken_store_show().
int stir_shaken_store_load | ( | void | ) |
Load time initialization for the stir/shaken 'store' configuration.
0 | on success, -1 on error |
Definition at line 180 of file store.c.
References ARRAY_LEN, ast_cli_register_multiple, ast_log, ast_sorcery_apply_default, ast_sorcery_object_field_register, ast_sorcery_object_field_register_custom, ast_sorcery_object_register, ast_stir_shaken_sorcery(), CONFIG_TYPE, LOG_ERROR, NULL, on_load_path(), on_load_public_cert_url(), OPT_NOOP_T, path_to_str(), public_cert_url_to_str(), sorcery, stir_shaken_store_alloc(), and stir_shaken_store_apply().
Referenced by load_module().
|
static |
Definition at line 84 of file store.c.
References ao2_cleanup, ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, ast_cli_args::pos, stir_shaken_cli_show(), stir_shaken_store_get(), stir_shaken_store_get_all(), stir_shaken_tab_complete_name(), ast_cli_entry::usage, and ast_cli_args::word.
int stir_shaken_store_unload | ( | void | ) |
Unload time cleanup for the stir/shaken 'store' configuration.
0 | on success, -1 on error |
Definition at line 172 of file store.c.
References ARRAY_LEN, and ast_cli_unregister_multiple().
Referenced by unload_module().
|
static |