mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
stir_shaken: Fix propagation of attest_level and a few other values
attest_level, send_mky and check_tn_cert_public_url weren't propagating correctly from the attestation object to the profile and tn. * In the case of attest_level, the enum needed to be changed so the "0" value (the default) was "NOT_SET" instead of "A". This now allows the merging of the attestation object, profile and tn to detect when a value isn't set and use the higher level value. * For send_mky and check_tn_cert_public_url, the tn default was forced to "NO" which always overrode the profile and attestation objects. Their defaults are now "NOT_SET" so the propagation happens correctly. * Just to remove some redundant code in tn_config.c, a bunch of calls to generate_sorcery_enum_from_str() and generate_sorcery_enum_to_str() were replaced with a single call to generate_acfg_common_sorcery_handlers(). Resolves: #904
This commit is contained in:
@@ -28,11 +28,11 @@
|
||||
|
||||
#define CONFIG_TYPE "tn"
|
||||
|
||||
#define DEFAULT_check_tn_cert_public_url check_tn_cert_public_url_NO
|
||||
#define DEFAULT_check_tn_cert_public_url check_tn_cert_public_url_NOT_SET
|
||||
#define DEFAULT_private_key_file NULL
|
||||
#define DEFAULT_public_cert_url NULL
|
||||
#define DEFAULT_attest_level attest_level_NOT_SET
|
||||
#define DEFAULT_send_mky send_mky_NO
|
||||
#define DEFAULT_send_mky send_mky_NOT_SET
|
||||
|
||||
struct tn_cfg *tn_get_cfg(const char *id)
|
||||
{
|
||||
@@ -45,14 +45,7 @@ static struct ao2_container *get_tn_all(void)
|
||||
AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL);
|
||||
}
|
||||
|
||||
generate_sorcery_enum_from_str(tn_cfg, acfg_common., check_tn_cert_public_url, UNKNOWN)
|
||||
generate_sorcery_enum_to_str(tn_cfg, acfg_common., check_tn_cert_public_url)
|
||||
|
||||
generate_sorcery_enum_from_str(tn_cfg, acfg_common., attest_level, UNKNOWN)
|
||||
generate_sorcery_enum_to_str(tn_cfg, acfg_common., attest_level)
|
||||
|
||||
generate_sorcery_enum_from_str(tn_cfg, acfg_common., send_mky, UNKNOWN)
|
||||
generate_sorcery_enum_to_str(tn_cfg, acfg_common., send_mky)
|
||||
generate_acfg_common_sorcery_handlers(tn_cfg);
|
||||
|
||||
static void tn_destructor(void *obj)
|
||||
{
|
||||
|
Reference in New Issue
Block a user