BSL v1.1.1 - 19.g31939de
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
DefaultScUtils.c File Reference
#include <assert.h>
#include <m-string.h>
#include <BPSecLib_Private.h>
#include <CryptoInterface.h>
#include <mock_bpa/MockBPA.h>
#include <backend/IdValPair.h>
#include <backend/SecurityActionSet.h>
#include <backend/UtilDefs_SeqReadWrite.h>
#include <policy_provider/SamplePolicyProvider.h>
#include <default_sc/DefaultSecContext.h>
#include "DefaultScUtils.h"
+ Include dependency graph for DefaultScUtils.c:

Macros

#define quick_data(field, tgt)   BSL_Data_InitView(&(field), sizeof(tgt), (BSL_DataPtr_t)(tgt))
 

Functions

void BIBTestContext_Init (BIBTestContext *obj)
 
void BIBTestContext_Deinit (BIBTestContext *obj)
 
void BCBTestContext_Init (BCBTestContext *obj)
 
void BCBTestContext_Deinit (BCBTestContext *obj)
 
void BSL_TestUtils_InitBIB_AppendixA1 (BIBTestContext *context, BSL_SecRole_e role, const char *key_id)
 
void BSL_TestUtils_InitBCB_Appendix2 (BCBTestContext *context, BSL_SecRole_e role)
 
RFC9173_A1_Params BSL_TestUtils_GetRFC9173_A1Params (const char *key_id)
 
BSL_SecurityActionSet_t * BSL_TestUtils_InitMallocBIBActionSet (BIBTestContext *bib_context)
 
BSL_SecurityResponseSet_t * BSL_TestUtils_MallocEmptyPolicyResponse (void)
 
int rfc9173_byte_gen_fn_a1 (unsigned char *buf, int len)
 
int rfc9173_byte_gen_fn_a2_kek (unsigned char *buf, int len)
 
int rfc9173_byte_gen_fn_a2_cek (unsigned char *buf, int len)
 
int rfc9173_byte_gen_fn_a4 (unsigned char *buf, int len)
 
void BSL_TestUtils_SetupDefaultSecurityContext (BSL_LibCtx_t *bsl_lib)
 

Variables

const struct RFC9173_TestVectors_AppendixA1 RFC9173_TestVectors_AppendixA1
 
const struct RFC9173_TestVectorsA2 RFC9173_TestVectors_AppendixA2
 
const struct RFC9173_TestVectors_A4_Modified RFC9173_TestVectors_AppendixA4
 

Macro Definition Documentation

◆ quick_data

#define quick_data (   field,
  tgt 
)    BSL_Data_InitView(&(field), sizeof(tgt), (BSL_DataPtr_t)(tgt))

Function Documentation

◆ BCBTestContext_Deinit()

◆ BCBTestContext_Init()

◆ BIBTestContext_Deinit()

◆ BIBTestContext_Init()

◆ BSL_TestUtils_GetRFC9173_A1Params()

◆ BSL_TestUtils_InitBCB_Appendix2()

◆ BSL_TestUtils_InitBIB_AppendixA1()

◆ BSL_TestUtils_InitMallocBIBActionSet()

◆ BSL_TestUtils_MallocEmptyPolicyResponse()

◆ BSL_TestUtils_SetupDefaultSecurityContext()

◆ rfc9173_byte_gen_fn_a1()

int rfc9173_byte_gen_fn_a1 ( unsigned char *  buf,
int  len 
)

◆ rfc9173_byte_gen_fn_a2_cek()

int rfc9173_byte_gen_fn_a2_cek ( unsigned char *  buf,
int  len 
)

◆ rfc9173_byte_gen_fn_a2_kek()

int rfc9173_byte_gen_fn_a2_kek ( unsigned char *  buf,
int  len 
)

References buf.

◆ rfc9173_byte_gen_fn_a4()

int rfc9173_byte_gen_fn_a4 ( unsigned char *  buf,
int  len 
)

Variable Documentation

◆ RFC9173_TestVectors_AppendixA1

◆ RFC9173_TestVectors_AppendixA2

const struct RFC9173_TestVectorsA2 RFC9173_TestVectors_AppendixA2

◆ RFC9173_TestVectors_AppendixA4

const struct RFC9173_TestVectors_A4_Modified RFC9173_TestVectors_AppendixA4
Initial value:
= {
.hex_bundle_original = ("9f88070000820282010282028202018202820201820018"
"281A000F424085010100005823526561647920746F2067"
"656E657261746520612033322D62797465207061796C6F"
"6164ff"),
.hex_bundle_final = ("9f88070000820282010282028202018202820201820018"
"281A000F4240850B030000585681010101820282020182"
"8201078203008181820158403BDC69B3A34A2B5D3A8554"
"368BD1E808F606219D2A10A846EAE3886AE4ECC83C4EE5"
"50FDFB1CC636B904E2F1A73E303DCD4B6CCECE003E95E8"
"164DCC89A156E1850C0201005850810102018202820201"
"8482014C5477656C766531323132313282020182035818"
"69C411276FECDDC4780DF42C8A2AF89296FABF34D7FAE7"
"008204008181820150EFA4B5AC0108E3816C5606479801"
"BC04850101000058233A09C1E63FE23A7F66A59C730383"
"7241E070B02619FC59C5214A22F08CD70795E73E9Aff"),
}

Referenced by TEST_CASE().