|
BSL v1.1.1 - 39.g9f43410
AMMOS Bundle Protocol Security Library (BSL)
|
Entry point for the sample policy provider of the BSL. More...
#include "SamplePolicyProvider.h"#include "bsl/BPSecLib_Private.h"#include "bsl/default_sc/rfc9173.h"#include <inttypes.h>#include <stdio.h>
Include dependency graph for PolicyParser.h:
This graph shows which files directly or indirectly include this file:Typedefs | |
| typedef uint32_t | BSLP_PolicyParser_BitstringConfig_t |
| Bitwise Diagram of the mock bpa config data structure: | |
Functions | |
| int | BSLP_PolicyParser_FromJSON (const char *policy_cfg_path, BSLP_PolicyProvider_t *policy) |
| Initialize local policy provider from JSON file. | |
| int | BSLP_PolicyParser_FromBitstringList (const char *policies, BSLP_PolicyProvider_t *policy) |
| Initialize local policy provider from list of bit strings. | |
Entry point for the sample policy provider of the BSL.
Configuration input is handled by PolicyParser.h functions.
| typedef uint32_t BSLP_PolicyParser_BitstringConfig_t |
Bitwise Diagram of the mock bpa config data structure:
| int BSLP_PolicyParser_FromBitstringList | ( | 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_PolicyParser_BitstringConfig_t |
| [in,out] | policy | policy provider to configure. Must be initialize/allocated |
References BSL_LOG_ERR, BSL_SUCCESS, BSLP_RegisterPolicyFromBitstring(), CHK_ARG_NONNULL, and policy.
Referenced by main().
| int BSLP_PolicyParser_FromJSON | ( | 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_SUCCESS, BSLP_PolicyParser_ReadOneRule(), CHK_ARG_NONNULL, and policy.
Referenced by main(), test_PolicyParser_ReadConfigEmpty(), test_PolicyParser_ReadConfigInvalid(), and test_PolicyParser_ReadConfigValid().