BSL v1.1.1 - 50.g42e5d9b
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches

Common functions to load keys from file. More...

#include "KeyStore.h"
+ Include dependency graph for KeyLoader.h:
+ This graph shows which files directly or indirectly include this file:

Functions

int BSL_Crypto_KeyLoader_LoadFile (const char *file_path)
 Load keys from file.
 
int BSL_Crypto_KeyLoader_LoadJwkSet (int infd)
 
int BSL_Crypto_KeyLoader_LoadCoseKeySet (int infd)
 

Detailed Description

Common functions to load keys from file.

Function Documentation

◆ BSL_Crypto_KeyLoader_LoadCoseKeySet()

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

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

Referenced by BSL_Crypto_KeyLoader_LoadFile(), and LLVMFuzzerTestOneInput().

◆ BSL_Crypto_KeyLoader_LoadFile()

int BSL_Crypto_KeyLoader_LoadFile ( const char *  file_path)

Load keys from file.

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

References BSL_Crypto_KeyLoader_LoadCoseKeySet(), BSL_Crypto_KeyLoader_LoadJwkSet(), BSL_ERR_ARG_INVALID, BSL_ERR_DECODING, BSL_LOG_ERR, BSL_LOG_INFO, and BSL_SUCCESS.

Referenced by main().

◆ BSL_Crypto_KeyLoader_LoadJwkSet()