BSL v1.1.1 - 39.g9f43410
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
key_registry.h File Reference
#include "bsl/crypto/CryptoInterface.h"
#include <inttypes.h>
+ Include dependency graph for key_registry.h:
+ This graph shows which files directly or indirectly include this file:

Functions

int mock_bpa_key_registry_init (const char *file_path)
 Initialize keys.
 
int mock_bpa_key_registry_init_jwk (int infd)
 
int mock_bpa_key_registry_init_cosekey (int infd)
 
int mock_bpa_rfc9173_bcb_cek (unsigned char *buf, int len)
 Custom RNG function for BCB testing.
 

Function Documentation

◆ mock_bpa_key_registry_init()

int mock_bpa_key_registry_init ( const char *  file_path)

Initialize keys.

Parameters
[in]file_pathpath to JSON file with JWKs or CBOR file with COSE_KeySet
Returns
0 if successful.

References BSL_ERR_ARG_INVALID, BSL_ERR_DECODING, BSL_LOG_ERR, BSL_LOG_INFO, BSL_SUCCESS, mock_bpa_key_registry_init_cosekey(), and mock_bpa_key_registry_init_jwk().

Referenced by main().

◆ mock_bpa_key_registry_init_cosekey()

int mock_bpa_key_registry_init_cosekey ( int  infd)
Warning
Exposed only for testing.
Parameters
infdThe file descriptor to read from.

References BSL_CBOR_Decode(), BSL_Data_InitView(), BSL_ERR_DECODING, BSL_LOG_ERR, and mock_bpa_key_registry_cosekey_decode().

Referenced by LLVMFuzzerTestOneInput(), and mock_bpa_key_registry_init().

◆ mock_bpa_key_registry_init_jwk()

◆ mock_bpa_rfc9173_bcb_cek()

int mock_bpa_rfc9173_bcb_cek ( unsigned char *  buf,
int  len 
)

Custom RNG function for BCB testing.

Referenced by main().