|
BSL v1.0.0 - 16.g9d98179
AMMOS Bundle Protocol Security Library (BSL)
|
Include dependency graph for SecOutcome.c:Functions | |
| size_t | BSL_SecOutcome_Sizeof (void) |
| Returns the size of the BSL_SecOutcome_s structure. | |
| void | BSL_SecOutcome_Init (BSL_SecOutcome_t *self, const BSL_SecOper_t *sec_oper, size_t allocation_size) |
| Populate a pre-allocated security outcome struct. | |
| void | BSL_SecOutcome_Deinit (BSL_SecOutcome_t *self) |
| Release any resources owned by this security outcome. | |
| bool | BSL_SecOutcome_IsConsistent (const BSL_SecOutcome_t *self) |
| Return true if internal invariants hold. | |
| void | BSL_SecOutcome_AppendResult (BSL_SecOutcome_t *self, const BSL_SecResult_t *sec_result) |
| Append a Security Result to this outcome. | |
| size_t | BSL_SecOutcome_CountResults (const BSL_SecOutcome_t *self) |
| Get the number of results. | |
| const BSL_SecResult_t * | BSL_SecOutcome_GetResultAtIndex (const BSL_SecOutcome_t *self, size_t index) |
| Get the result at index i. | |
| size_t | BSL_SecOutcome_CountParams (const BSL_SecOutcome_t *self) |
| Returns number of parameters in this outcome. | |
| const BSL_SecParam_t * | BSL_SecOutcome_GetParamAt (const BSL_SecOutcome_t *self, size_t index) |
| Get the security parameter from the security outcome at the provided index. | |
| void | BSL_SecOutcome_AppendParam (BSL_SecOutcome_t *self, const BSL_SecParam_t *param) |
| Append a Security Parameter to this outcome. | |
| static bool | BSL_AbsSecBlock_ContainsResult (const BSL_AbsSecBlock_t *abs_sec_block, const BSL_SecResult_t *actual) |
| bool | BSL_SecOutcome_IsInAbsSecBlock (const BSL_SecOutcome_t *self, const BSL_AbsSecBlock_t *abs_sec_block) |
| Returns true if this (the parameters and results) is contained within the given ASK. | |
|
static |
References ASSERT_POSTCONDITION, ASSERT_PRECONDITION, ASSERT_PROPERTY, BSL_AbsSecBlock_IsConsistent(), BSL_AbsSecBlock_Print(), BSL_SecResult_IsConsistent(), and expected.
Referenced by BSL_SecOutcome_IsInAbsSecBlock().
| void BSL_SecOutcome_AppendParam | ( | BSL_SecOutcome_t * | self, |
| const BSL_SecParam_t * | param | ||
| ) |
Append a Security Parameter to this outcome.
| [in,out] | self | Non-NULL pointer to this security outcome. |
| [in] | param | Non-NULL pointer to security parameter to copy and append. |
References ASSERT_POSTCONDITION, ASSERT_PRECONDITION, BSL_SecOutcome_IsConsistent(), and BSL_SecParam_IsConsistent().
Referenced by BSLX_BCB_Execute(), and BSLX_BIB_Execute().
| void BSL_SecOutcome_AppendResult | ( | BSL_SecOutcome_t * | self, |
| const BSL_SecResult_t * | sec_result | ||
| ) |
Append a Security Result to this outcome.
| [in,out] | self | Non-NULL pointer to this security outcome. |
| [in] | sec_result | Non-NULL pointer to security result to copy and append. |
References ASSERT_POSTCONDITION, ASSERT_PRECONDITION, BSL_SecOutcome_IsConsistent(), and BSL_SecResult_IsConsistent().
Referenced by BSLX_BCB_Execute(), and BSLX_BIB_Execute().
| size_t BSL_SecOutcome_CountParams | ( | const BSL_SecOutcome_t * | self | ) |
Returns number of parameters in this outcome.
| [in] | self | This outcome |
References ASSERT_PRECONDITION, and BSL_SecOutcome_IsConsistent().
Referenced by BSL_ExecBCBSource(), BSL_ExecBIBSource(), BSL_SecOutcome_GetParamAt(), and test_sec_source_keywrap().
| size_t BSL_SecOutcome_CountResults | ( | const BSL_SecOutcome_t * | self | ) |
Get the number of results.
| [in] | self | this sec outcome |
References ASSERT_PRECONDITION, and BSL_SecOutcome_IsConsistent().
Referenced by BSL_ExecBCBSource(), BSL_ExecBIBSource(), BSL_SecOutcome_GetResultAtIndex(), test_RFC9173_AppendixA_Example1_BIB_Source(), test_RFC9173_AppendixA_Example2_BCB_Acceptor(), test_RFC9173_AppendixA_Example2_BCB_Source(), and test_sec_source_keywrap().
| void BSL_SecOutcome_Deinit | ( | BSL_SecOutcome_t * | self | ) |
Release any resources owned by this security outcome.
| [in,out] | self | Non-Null pointer to this security outcome. |
References ASSERT_PRECONDITION, BSL_Data_Deinit(), and BSL_SecOutcome_IsConsistent().
Referenced by BSL_SecCtx_ExecutePolicyActionSet(), test_RFC9173_AppendixA_Example1_BIB_Source(), test_RFC9173_AppendixA_Example2_BCB_Acceptor(), test_RFC9173_AppendixA_Example2_BCB_Source(), test_sec_accept_keyunwrap(), and test_sec_source_keywrap().
| const BSL_SecParam_t * BSL_SecOutcome_GetParamAt | ( | const BSL_SecOutcome_t * | self, |
| size_t | index | ||
| ) |
Get the security parameter from the security outcome at the provided index.
| [in] | self | security outcome |
| [in] | index | index to retrieve security parameter from |
References ASSERT_PRECONDITION, BSL_SecOutcome_CountParams(), and BSL_SecOutcome_IsConsistent().
Referenced by BSL_ExecBCBSource(), BSL_ExecBIBSource(), and test_sec_source_keywrap().
| const BSL_SecResult_t * BSL_SecOutcome_GetResultAtIndex | ( | const BSL_SecOutcome_t * | self, |
| size_t | index | ||
| ) |
Get the result at index i.
Panics if i is out of range.
| [in] | self | This outcome |
| [in] | index | Index in the list to retrieve |
References ASSERT_PRECONDITION, BSL_SecOutcome_CountResults(), and BSL_SecOutcome_IsConsistent().
Referenced by BSL_ExecBCBSource(), BSL_ExecBIBSource(), test_RFC9173_AppendixA_Example1_BIB_Source(), test_RFC9173_AppendixA_Example2_BCB_Source(), and test_sec_source_keywrap().
| void BSL_SecOutcome_Init | ( | BSL_SecOutcome_t * | self, |
| const BSL_SecOper_t * | sec_oper, | ||
| size_t | allocation_size | ||
| ) |
Populate a pre-allocated security outcome struct.
| [in,out] | self | Non-Null pointer to this security outcome. |
| [in] | sec_oper | Security operation containing the necessary info. |
| [in] | allocation_size | Size of working space to allocate. |
References ASSERT_ARG_EXPR, ASSERT_ARG_NONNULL, ASSERT_POSTCONDITION, ASSERT_PRECONDITION, BSL_Data_InitBuffer(), BSL_SecOper_IsConsistent(), and BSL_SecOutcome_IsConsistent().
Referenced by BSL_SecCtx_ExecutePolicyActionSet(), test_RFC9173_AppendixA_Example1_BIB_Source(), test_RFC9173_AppendixA_Example2_BCB_Acceptor(), test_RFC9173_AppendixA_Example2_BCB_Source(), test_sec_accept_keyunwrap(), and test_sec_source_keywrap().
| bool BSL_SecOutcome_IsConsistent | ( | const BSL_SecOutcome_t * | self | ) |
Return true if internal invariants hold.
| [in] | self | This sec outcome. |
References CHK_AS_BOOL.
Referenced by BSL_ExecBIBAccept(), BSL_SecOutcome_AppendParam(), BSL_SecOutcome_AppendResult(), BSL_SecOutcome_CountParams(), BSL_SecOutcome_CountResults(), BSL_SecOutcome_Deinit(), BSL_SecOutcome_GetParamAt(), BSL_SecOutcome_GetResultAtIndex(), BSL_SecOutcome_Init(), and BSL_SecOutcome_IsInAbsSecBlock().
| bool BSL_SecOutcome_IsInAbsSecBlock | ( | const BSL_SecOutcome_t * | self, |
| const BSL_AbsSecBlock_t * | abs_sec_block | ||
| ) |
Returns true if this (the parameters and results) is contained within the given ASK.
| [in] | self | |
| [in] | outcome |
References ASSERT_PRECONDITION, ASSERT_PROPERTY, BSL_AbsSecBlock_ContainsResult(), BSL_AbsSecBlock_IsConsistent(), BSL_LOG_DEBUG, BSL_LOG_ERR, and BSL_SecOutcome_IsConsistent().
Referenced by BSL_ExecBIBAccept().
| size_t BSL_SecOutcome_Sizeof | ( | void | ) |
Returns the size of the BSL_SecOutcome_s structure.
Referenced by BSL_SecCtx_ExecutePolicyActionSet(), test_RFC9173_AppendixA_Example1_BIB_Source(), test_RFC9173_AppendixA_Example2_BCB_Acceptor(), test_RFC9173_AppendixA_Example2_BCB_Source(), test_sec_accept_keyunwrap(), and test_sec_source_keywrap().