|
BSL v1.1.1 - 19.g31939de
AMMOS Bundle Protocol Security Library (BSL)
|
#include <inttypes.h>#include <stdio.h>#include <jansson.h>#include <BPSecLib_Private.h>#include <CryptoInterface.h>#include <default_sc/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_IdValPair_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_IdValPair_Init(), BSL_IdValPair_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_IdValPair_Set(), BSL_IdValPair_SetInt64(), BSL_IdValPair_SetTextstr(), 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_SECROLE_ACCEPTOR, BSL_SECROLE_SOURCE, BSL_SECROLE_VERIFIER, BSL_SUCCESS, BSLP_InitParams_Deinit(), BSLP_InitParams_Init(), BSLP_PolicyPredicate_InitFrom(), BSLP_PolicyProvider_AddRule(), BSLP_PolicyRule_AddOption(), BSLP_PolicyRule_InitFrom(), BSLX_BCB_OPT_AES_VARIANT, BSLX_BCB_OPT_KEY_ID, BSLX_BCB_OPT_SCOPE, BSLX_BCB_OPT_USE_KEY_WRAP, BSLX_BIB_OPT_KEY_ID, BSLX_BIB_OPT_SCOPE, BSLX_BIB_OPT_SHA_VARIANT, BSLX_BIB_OPT_USE_KEY_WRAP, 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_BIB_SHA_HMAC256, RFC9173_BIB_SHA_HMAC384, RFC9173_BIB_SHA_HMAC512, RFC9173_CONTEXTID_BCB_AES_GCM, RFC9173_CONTEXTID_BIB_HMAC_SHA2, and sha_var.
Referenced by main().