S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_sk_builder.h File Reference

Security Keys Builder: provides update function to retrieve keys from the Security Keys Provider and fills the Security Keys Manager. More...

#include <stdbool.h>
#include <stdint.h>
#include "sopc_builtintypes.h"
#include "sopc_enums.h"
#include "sopc_sk_manager.h"
#include "sopc_sk_provider.h"

Go to the source code of this file.

Data Structures

struct  SOPC_SKBuilder
 Bytes Security Keys Builder structure. More...
 

Macros

#define SOPC_SK_BUILDER_NB_GENERATED_KEYS   5
 

Typedefs

typedef struct SOPC_SKBuilder SOPC_SKBuilder
 
typedef SOPC_ReturnStatus(* SOPC_SKBuilder_Update_Func) (SOPC_SKBuilder *skb, SOPC_SKProvider *skp, SOPC_SKManager *skm)
 
typedef void(* SOPC_SKBuilder_Clear_Func) (void *data)
 

Functions

SOPC_SKBuilderSOPC_SKBuilder_Append_Create (void)
 Creates an instance of a default SOPC_SKBuilder which append data to the Security Keys Manager.
 
SOPC_SKBuilderSOPC_SKBuilder_Truncate_Create (SOPC_SKBuilder *skb, uint32_t sizeMax)
 Creates an instance of a default SOPC_SKBuilder which deletes old keys.
 
SOPC_SKBuilderSOPC_SKBuilder_Setter_Create (void)
 Creates an instance of a default SOPC_SKBuilder which replaces all the keys.
 
SOPC_ReturnStatus SOPC_SKBuilder_Update (SOPC_SKBuilder *skb, SOPC_SKProvider *skp, SOPC_SKManager *skm)
 Gets Keys from a Security Keys Provider and fill Security Keys Manager.
 
void SOPC_SKBuilder_Clear (SOPC_SKBuilder *skb)
 Deallocates Security Keys Builder data bytes content.
 

Detailed Description

Security Keys Builder: provides update function to retrieve keys from the Security Keys Provider and fills the Security Keys Manager.

Note
Keys can be set or appended (with or without a maximum limit of elements)

Macro Definition Documentation

◆ SOPC_SK_BUILDER_NB_GENERATED_KEYS

#define SOPC_SK_BUILDER_NB_GENERATED_KEYS   5

Typedef Documentation

◆ SOPC_SKBuilder

typedef struct SOPC_SKBuilder SOPC_SKBuilder

◆ SOPC_SKBuilder_Update_Func

typedef SOPC_ReturnStatus(* SOPC_SKBuilder_Update_Func) (SOPC_SKBuilder *skb, SOPC_SKProvider *skp, SOPC_SKManager *skm)

◆ SOPC_SKBuilder_Clear_Func

typedef void(* SOPC_SKBuilder_Clear_Func) (void *data)

Function Documentation

◆ SOPC_SKBuilder_Append_Create()

SOPC_SKBuilder * SOPC_SKBuilder_Append_Create ( void )

Creates an instance of a default SOPC_SKBuilder which append data to the Security Keys Manager.

Returns
a SOPC_SKBuilder object or NULL if not enough memory

◆ SOPC_SKBuilder_Truncate_Create()

SOPC_SKBuilder * SOPC_SKBuilder_Truncate_Create ( SOPC_SKBuilder * skb,
uint32_t sizeMax )

Creates an instance of a default SOPC_SKBuilder which deletes old keys.

Parameters
skbThe builder used to retrieve the keys that will be truncated
sizeMaxThe maximum number of keys to keep in the security keys manager
Returns
a SOPC_SKBuilder object or NULL if not enough memory

◆ SOPC_SKBuilder_Setter_Create()

SOPC_SKBuilder * SOPC_SKBuilder_Setter_Create ( void )

Creates an instance of a default SOPC_SKBuilder which replaces all the keys.

Returns
a SOPC_SKBuilder object or NULL if not enough memory

◆ SOPC_SKBuilder_Update()

SOPC_ReturnStatus SOPC_SKBuilder_Update ( SOPC_SKBuilder * skb,
SOPC_SKProvider * skp,
SOPC_SKManager * skm )

Gets Keys from a Security Keys Provider and fill Security Keys Manager.

Parameters
skbPointer to Security Keys Builder. Should not be NULL
skpPointer to Security Keys Provider. Should not be NULL
skmPointer to Security Keys Manager. Should not be NULL
Returns
SOPC_STATUS_OK if keys are set

◆ SOPC_SKBuilder_Clear()

void SOPC_SKBuilder_Clear ( SOPC_SKBuilder * skb)

Deallocates Security Keys Builder data bytes content.

Parameters
skbPointer to Security Keys Builder. Should not be NULL