S2OPC OPCUA Toolkit
|
Security Keys Provider: source providing the keys for SKS. More...
Go to the source code of this file.
Data Structures | |
struct | SOPC_SKProvider |
Security Keys Provider structure. More... | |
Typedefs | |
typedef struct SOPC_SKProvider | SOPC_SKProvider |
typedef SOPC_ReturnStatus(* | SOPC_SKProvider_GetKeys_Func) (SOPC_SKProvider *skp, uint32_t StartingTokenId, uint32_t NbRequestedToken, SOPC_String **SecurityPolicyUri, uint32_t *FirstTokenId, SOPC_ByteString **Keys, uint32_t *NbKeys, uint32_t *TimeToNextKey, uint32_t *KeyLifetime) |
typedef void(* | SOPC_SKProvider_Clear_Func) (void *data) |
Functions | |
SOPC_SKProvider * | SOPC_SKProvider_TryList_Create (SOPC_SKProvider **providers, uint32_t nbProviders) |
Creates an instance of SOPC_SKProvider which call sequentially all provider of a list until one returns valid Keys. | |
SOPC_SKProvider * | SOPC_SKProvider_RandomPubSub_Create (uint32_t maxKeys) |
Creates an instance of SOPC_SKProvider which return random Keys for PubSub Policy. | |
SOPC_ReturnStatus | SOPC_SKProvider_GetKeys (SOPC_SKProvider *skp, uint32_t StartingTokenId, uint32_t NbRequestedToken, SOPC_String **SecurityPolicyUri, uint32_t *FirstTokenId, SOPC_ByteString **Keys, uint32_t *NbKeys, uint32_t *TimeToNextKey, uint32_t *KeyLifetime) |
Gets Keys of a Security Keys Provider for a given security group. All returned data are copied by this function. The caller is responsible for deleting these data. Output parameters may be NULL exept Keys and NbKeys. | |
void | SOPC_SKProvider_Clear (SOPC_SKProvider *skp) |
Deallocates Security Keys Provider data bytes content. | |
Security Keys Provider: source providing the keys for SKS.
typedef struct SOPC_SKProvider SOPC_SKProvider |
typedef SOPC_ReturnStatus(* SOPC_SKProvider_GetKeys_Func) (SOPC_SKProvider *skp, uint32_t StartingTokenId, uint32_t NbRequestedToken, SOPC_String **SecurityPolicyUri, uint32_t *FirstTokenId, SOPC_ByteString **Keys, uint32_t *NbKeys, uint32_t *TimeToNextKey, uint32_t *KeyLifetime) |
typedef void(* SOPC_SKProvider_Clear_Func) (void *data) |
SOPC_SKProvider * SOPC_SKProvider_TryList_Create | ( | SOPC_SKProvider ** | providers, |
uint32_t | nbProviders ) |
Creates an instance of SOPC_SKProvider which call sequentially all provider of a list until one returns valid Keys.
providers | A valid pointer of SOPC_SKProvider array. Should not be NULL |
nbProviders | The number of element of the the given array. Should not be 0 |
SOPC_SKProvider * SOPC_SKProvider_RandomPubSub_Create | ( | uint32_t | maxKeys | ) |
Creates an instance of SOPC_SKProvider which return random Keys for PubSub Policy.
maxKeys | Maximum number of Keys returned by SOPC_SKProvider_GetKeys() |
SOPC_ReturnStatus SOPC_SKProvider_GetKeys | ( | SOPC_SKProvider * | skp, |
uint32_t | StartingTokenId, | ||
uint32_t | NbRequestedToken, | ||
SOPC_String ** | SecurityPolicyUri, | ||
uint32_t * | FirstTokenId, | ||
SOPC_ByteString ** | Keys, | ||
uint32_t * | NbKeys, | ||
uint32_t * | TimeToNextKey, | ||
uint32_t * | KeyLifetime ) |
Gets Keys of a Security Keys Provider for a given security group. All returned data are copied by this function. The caller is responsible for deleting these data. Output parameters may be NULL exept Keys and NbKeys.
skp | Pointer to Security Keys Provider. Input parameter. Should not be NULL |
StartingTokenId | The current token is requested by passing 0. It can be a SecurityTokenId from the past to get a key valid for previously sent messages |
NbRequestedToken | The number of requested keys tokens which should be returned in the response |
SecurityPolicyUri | The URI for the set of algorithms and key lengths used to secure the messages |
FirstTokenId | The SecurityTokenId of the first key in the array of returned keys. |
Keys | An ordered list of keys that are used when the KeyLifetime elapses |
NbKeys | The number of keys tokens in Keys array |
TimeToNextKey | The time, in milliseconds, before the CurrentKey is expected to expire |
KeyLifetime | The lifetime of a key in milliseconds |
void SOPC_SKProvider_Clear | ( | SOPC_SKProvider * | skp | ) |
Deallocates Security Keys Provider data bytes content.
skp | Pointer to Security Keys Provider. Should not be NULL |