|
BSL v1.0.0 - 29.g99f1b76
AMMOS Bundle Protocol Security Library (BSL)
|
#include <inttypes.h>#include <stdio.h>#include <jansson.h>#include <BPSecLib_Private.h>#include <CryptoInterface.h>#include <security_context/rfc9173.h>#include "SamplePolicyProvider.h"
Include dependency graph for SamplePolicyConfigParser.h:
This graph shows which files directly or indirectly include this file:Data Structures | |
| struct | BSLP_InitParams_t |
Typedefs | |
| typedef uint32_t | BSLP_BitstringPolicyConfiguration_t |
| Bitwise Diagram of the mock bpa config data structure: | |
Functions | |
| int | BSLP_InitParams_Init (BSLP_InitParams_t *params) |
| Initialize local policy provider parameters. | |
| void | BSLP_InitParams_Deinit (BSLP_InitParams_t *params) |
| Deinitialize local policy provider parameters. | |
| int | BSLP_RegisterPolicyFromJSON (const char *policy_cfg_path, BSLP_PolicyProvider_t *policy) |
| Initialize local policy provider from JSON file. | |
| int | BSLP_RegisterPolicyFromBitstringList (const char *policies, BSLP_PolicyProvider_t *policy) |
| Initialize local policy provider from list of bit strings. | |
| typedef uint32_t BSLP_BitstringPolicyConfiguration_t |
Bitwise Diagram of the mock bpa config data structure:
| void BSLP_InitParams_Deinit | ( | BSLP_InitParams_t * | params | ) |
Deinitialize local policy provider parameters.
| [in] | params | structure to deinitialize |
References BSL_free(), BSL_SecParam_Deinit(), BSLP_InitParams_t::param_aad_scope_flag, BSLP_InitParams_t::param_aes_variant, BSLP_InitParams_t::param_init_vector, BSLP_InitParams_t::param_integ_scope_flag, BSLP_InitParams_t::param_sha_variant, BSLP_InitParams_t::param_test_key, and BSLP_InitParams_t::param_use_wrapped_key.
Referenced by BSLP_RegisterPolicyFromBitstringList(), and BSLP_RegisterPolicyFromJSON().
| int BSLP_InitParams_Init | ( | BSLP_InitParams_t * | params | ) |
Initialize local policy provider parameters.
| [in,out] | params | structure to initialize |
References BSL_calloc(), BSL_ERR_INSUFFICIENT_SPACE, BSL_SecParam_Sizeof(), BSL_SUCCESS, BSLP_InitParams_t::param_aad_scope_flag, BSLP_InitParams_t::param_aes_variant, BSLP_InitParams_t::param_init_vector, BSLP_InitParams_t::param_integ_scope_flag, BSLP_InitParams_t::param_sha_variant, BSLP_InitParams_t::param_test_key, and BSLP_InitParams_t::param_use_wrapped_key.
Referenced by BSLP_RegisterPolicyFromBitstringList(), and BSLP_RegisterPolicyFromJSON().
| int BSLP_RegisterPolicyFromBitstringList | ( | const char * | policies, |
| BSLP_PolicyProvider_t * | policy | ||
| ) |
Initialize local policy provider from list of bit strings.
| [in] | policies | comma separated policy bit strings as described by BSLP_BitstringPolicyConfiguration_t |
| [in,out] | policy | policy provider to configure. Must be initialize/allocated |
References BSL_LOG_ERR, BSL_SUCCESS, BSLP_InitParams_Deinit(), BSLP_InitParams_Init(), BSLP_RegisterPolicyFromBitstring(), CHK_ARG_NONNULL, and policy.
Referenced by main().
| int BSLP_RegisterPolicyFromJSON | ( | const char * | policy_cfg_path, |
| BSLP_PolicyProvider_t * | policy | ||
| ) |
Initialize local policy provider from JSON file.
| [in] | policy_cfg_path | path to JSON file containing policy configuration |
| [in,out] | policy | policy provider to configure. Must be initialize/allocated |
References BSL_ERR_POLICY_CONFIG, BSL_LOG_DEBUG, BSL_LOG_ERR, BSL_POLICYACTION_DROP_BLOCK, BSL_POLICYACTION_DROP_BUNDLE, BSL_POLICYACTION_NOTHING, BSL_POLICYLOCATION_APPIN, BSL_POLICYLOCATION_APPOUT, BSL_POLICYLOCATION_CLIN, BSL_POLICYLOCATION_CLOUT, BSL_SECBLOCKTYPE_BCB, BSL_SECBLOCKTYPE_BIB, BSL_SecParam_InitTextstr(), BSL_SecParam_InitUint64(), BSL_SECPARAM_TYPE_KEY_ID, BSL_SECPARAM_USE_KEY_WRAP, BSL_SECROLE_ACCEPTOR, BSL_SECROLE_SOURCE, BSL_SECROLE_VERIFIER, BSL_SUCCESS, BSLP_InitParams_Deinit(), BSLP_InitParams_Init(), BSLP_PolicyPredicate_InitFrom(), BSLP_PolicyProvider_AddRule(), BSLP_PolicyRule_CopyParam(), BSLP_PolicyRule_InitFrom(), CHK_ARG_NONNULL, BSLP_InitParams_t::param_aad_scope_flag, BSLP_InitParams_t::param_aes_variant, BSLP_InitParams_t::param_integ_scope_flag, BSLP_InitParams_t::param_sha_variant, BSLP_InitParams_t::param_test_key, BSLP_InitParams_t::param_use_wrapped_key, policy, RFC9173_BCB_SECPARAM_AADSCOPE, RFC9173_BCB_SECPARAM_AESVARIANT, RFC9173_BIB_PARAMID_INTEG_SCOPE_FLAG, RFC9173_BIB_PARAMID_SHA_VARIANT, RFC9173_BIB_SHA_HMAC256, RFC9173_BIB_SHA_HMAC384, RFC9173_BIB_SHA_HMAC512, and sha_var.
Referenced by main().