|
BSL v1.1.1 - 39.g9f43410
AMMOS Bundle Protocol Security Library (BSL)
|
Defines the RFC 9172 Security Parameter of the Abstract Security Block. More...
#include "bsl/BPSecLib_Private.h"#include "bsl/dynamic/CBOR.h"#include <m-array.h>#include <m-bptree.h>#include <m-bstring.h>#include <m-shared-ptr.h>#include <stdint.h>
Include dependency graph for IdValPair.h:
This graph shows which files directly or indirectly include this file:Data Structures | |
| struct | BSL_IdValPair_t |
| Represents a security option, parameter, or result within in an ASB. More... | |
Macros | |
| #define | M_OPL_BSL_IdValPair_t() |
| OPLIST for BSL_IdValPair_s. | |
Enumerations | |
| enum | BSL_IdValPair_Type_e { BSL_IDVALPAIR_TYPE_UNKNOWN = 0 , BSL_IDVALPAIR_TYPE_INT64 , BSL_IDVALPAIR_TYPE_BYTESTR , BSL_IDVALPAIR_TYPE_TEXTSTR , BSL_IDVALPAIR_TYPE_RAW } |
| Types of values in BSL_IdValPair_s. More... | |
Functions | |
| int | BSL_IdValPair_Decode (QCBORDecodeContext *dec, BSL_IdValPair_t *pair) |
| Decode from CBOR, as a pair of items either in an array or from a map key-value. | |
| void | BSL_IdValPair_Encode (QCBOREncodeContext *enc, const BSL_IdValPair_t *pair) |
| Encode to CBOR, as a pair of items either in an array or a map key-value. | |
| static BSL_IdValPair_t * | BSLB_IdValPairPtrMap_add (BSLB_IdValPairPtrMap_t map, int64_t key) |
| Workaround default shared-ptr INIT being a NULL pointer. | |
Defines the RFC 9172 Security Parameter of the Abstract Security Block.
Declaration of an (id, value) pair container.
The details from the RFC Section 3.6 [1] are as follows:
This field captures one or more security context parameters that should be used when processing the security service described by this security block. This field SHALL be represented by a CBOR array. Each entry in this array is a single security context parameter. A single parameter SHALL also be represented as a CBOR array comprising a 2-tuple of the Id and value of the parameter, as follows.
Parameter Id:
- This field identifies which parameter is being specified.
- This field SHALL be represented as a CBOR unsigned integer.
- Parameter Ids are selected as described in Section 3.10.
Parameter Value:
- This field captures the value associated with this parameter.
- This field SHALL be represented by the applicable CBOR representation of the parameter, in accordance with Section 3.10.
| #define M_OPL_BSL_IdValPair_t | ( | ) |
OPLIST for BSL_IdValPair_s.
| enum BSL_IdValPair_Type_e |
Types of values in BSL_IdValPair_s.
Security options, parameters, and results defined in RFC9173 may be unsigned integers or bytestrings.
| int BSL_IdValPair_Decode | ( | QCBORDecodeContext * | dec, |
| BSL_IdValPair_t * | pair | ||
| ) |
Decode from CBOR, as a pair of items either in an array or from a map key-value.
Matches the BSL_CBOR_Decode_f signature.
References ASSERT_ARG_NONNULL, BSL_Data_InitView(), BSL_ERR_DECODING, BSL_IdValPair_SetBytestr(), BSL_IdValPair_SetInt64(), BSL_IdValPair_SetRaw(), BSL_LOG_DEBUG, BSL_LOG_ERR, BSL_SUCCESS, and BSL_Data_t::len.
Referenced by BSL_AbsSecBlock_Decode(), and BSLX_CoseMsg_Headers_Decode_Map().
| void BSL_IdValPair_Encode | ( | QCBOREncodeContext * | enc, |
| const BSL_IdValPair_t * | pair | ||
| ) |
Encode to CBOR, as a pair of items either in an array or a map key-value.
Matches the BSL_CBOR_Encode_f signature.
References BSL_IdValPair_GetAsBytestr(), BSL_IdValPair_GetAsInt64(), BSL_IdValPair_GetAsRaw(), BSL_IdValPair_IsBytestr(), BSL_IdValPair_IsInt64(), BSL_IdValPair_IsRaw(), BSL_LOG_CRIT, and UsefulBufC_FROM_BSL_Data.
Referenced by BSL_AbsSecBlock_Encode(), and BSLX_CoseMsg_Headers_Encode_Map().
|
inlinestatic |
Workaround default shared-ptr INIT being a NULL pointer.
Referenced by BSL_SecOper_AddParam(), BSL_SecOper_AddResult(), BSLP_PolicyOptions_SC1(), BSLP_PolicyOptions_SC2(), BSLP_PolicyOptions_SC3(), and BSLP_RegisterPolicyFromBitstring().