BSL v0.0.0 - 0.geda3e66
AMMOS Bundle Protocol Security Library (BSL)
|
Exercises the Security Context front-end interface. More...
#include <stdlib.h>
#include <stdio.h>
#include <unity.h>
#include <BPSecLib_Private.h>
#include <mock_bpa/MockBPA.h>
#include <CryptoInterface.h>
#include <security_context/rfc9173.h>
#include "bsl_test_utils.h"
Functions | |
void | suiteSetUp (void) |
int | suiteTearDown (int failures) |
void | setUp (void) |
void | tearDown (void) |
void | test_SecurityContext_BIB_Source (void) |
Purpose: Creates a BIB block and adds it to the bundle, confirms it matches the test vector in RFC9173. | |
void | test_SecurityContext_BIB_Verifier (void) |
Purpose: Tests that running as role VERIFIER passes correctly when the cryptographic material matches. | |
void | test_SecurityContext_BIB_Verifier_Failure (void) |
Purpose: Test that a BIB verification operation does not pass when the cryptographic material does not match. | |
void | test_SecurityContext_BIB_Acceptor (void) |
Tests that an acceptor will strip off the result and security block when the security operation validates correctly. | |
void | test_RFC9173_AppendixA_Example3_Acceptor (void) |
void | test_RFC9173_AppendixA_Example3_Source (void) |
void | test_RFC9173_AppendixA_Example4_Acceptor (void) |
void | test_RFC9173_AppendixA_Example4_Source (void) |
Variables | |
static BSL_TestContext_t | LocalTestCtx |
Exercises the Security Context front-end interface.
Notes:
void test_SecurityContext_BIB_Acceptor | ( | void | ) |
Tests that an acceptor will strip off the result and security block when the security operation validates correctly.
Steps:
References BSL_FREE, BSL_SecCtx_ExecutePolicyActionSet(), BSL_SECROLE_ACCEPTOR, BSL_SecurityActionSet_Deinit(), BSL_SecurityResponseSet_Deinit(), mock_bpa_ctr_t::bundle_ref, and mock_bpa_ctr_t::encoded.
void test_SecurityContext_BIB_Source | ( | void | ) |
Purpose: Creates a BIB block and adds it to the bundle, confirms it matches the test vector in RFC9173.
Steps:
Notes:
References BSL_BundleCtx_GetBlockMetadata(), BSL_FREE, BSL_SecCtx_ExecutePolicyActionSet(), BSL_SECROLE_SOURCE, BSL_SecurityActionSet_Deinit(), BSL_SecurityResponseSet_Deinit(), mock_bpa_ctr_t::bundle_ref, and mock_bpa_ctr_t::encoded.
void test_SecurityContext_BIB_Verifier | ( | void | ) |
Purpose: Tests that running as role VERIFIER passes correctly when the cryptographic material matches.
Steps:
Notes:
References BSL_FREE, BSL_SecCtx_ExecutePolicyActionSet(), BSL_SECROLE_VERIFIER, BSL_SecurityActionSet_Deinit(), BSL_SecurityResponseSet_Deinit(), mock_bpa_ctr_t::bundle_ref, and mock_bpa_ctr_t::encoded.
void test_SecurityContext_BIB_Verifier_Failure | ( | void | ) |
Purpose: Test that a BIB verification operation does not pass when the cryptographic material does not match.
Steps:
Notes:
References BSL_FREE, BSL_SecCtx_ExecutePolicyActionSet(), BSL_SECOP_CONCLUSION_FAILURE, BSL_SECROLE_VERIFIER, BSL_SecurityActionSet_Deinit(), BSL_SecurityActionSet_GetActionAtIndex(), BSL_SecurityResponseSet_Deinit(), BSL_SUCCESS, and mock_bpa_ctr_t::bundle_ref.