S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_pubsub_sks.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
29#ifndef SOPC_PUBSUB_SKS_H_
30#define SOPC_PUBSUB_SKS_H_
31
32#include "sopc_secret_buffer.h"
33#include "sopc_sk_manager.h"
34
35#ifndef SOPC_PUBSUB_SKS_DEFAULT_GROUPID
36#define SOPC_PUBSUB_SKS_DEFAULT_GROUPID 1
37#endif
38
39#ifndef SOPC_PUBSUB_SKS_DEFAULT_TOKENID
40#define SOPC_PUBSUB_SKS_DEFAULT_TOKENID 1
41#endif
42
43// To requested current token in getSecurityKey
44#define SOPC_PUBSUB_SKS_CURRENT_TOKENID SOPC_SK_MANAGER_CURRENT_TOKEN_ID
45
46typedef struct SOPC_PubSubSKS_Keys
47{
48 // The ID of the security token that identifies the security key in a SecurityGroup.
49 // not managed. Shall be one
50 uint32_t tokenId;
51
56
61
66
75
87SOPC_PubSubSKS_Keys* SOPC_PubSubSKS_GetSecurityKeys(uint32_t groupid, uint32_t tokenId);
88
97
98#endif /* SOPC_PUBSUB_SKS_H_ */
SOPC_PubSubSKS_Keys * SOPC_PubSubSKS_GetSecurityKeys(uint32_t groupid, uint32_t tokenId)
Return security key from a security group id. This function is automatically called by Publisher and ...
void SOPC_PubSubSKS_Clear(void)
Clear the PubSubSKS and set SKManager to NULL.
void SOPC_PubSubSKS_Keys_Delete(SOPC_PubSubSKS_Keys *keys)
Clear a SOPC_PubSubSKS_Keys the given parameter can be freed after the function returns.
void SOPC_PubSubSKS_Init(void)
Initialise the PubSubSKS.
void SOPC_PubSubSKS_SetSkManager(SOPC_SKManager *skm)
Set the Security Keys Manager to use to retrieve the keys for UADP secure exchanges Only one SK Manag...
struct SOPC_PubSubSKS_Keys SOPC_PubSubSKS_Keys
SecretBuffer (mangled key) and ExposedBuffer (contiguous deciphered buffered) APIs.
struct SOPC_SecretBuffer SOPC_SecretBuffer
Definition sopc_secret_buffer.h:35
Security Keys Manager: manages local storage of the keys retrieved from the Security Keys Provider fo...
Definition sopc_pubsub_sks.h:47
SOPC_SecretBuffer * signingKey
Definition sopc_pubsub_sks.h:52
SOPC_SecretBuffer * encryptKey
Definition sopc_pubsub_sks.h:53
SOPC_SecretBuffer * keyNonce
Definition sopc_pubsub_sks.h:54
uint32_t tokenId
Definition sopc_pubsub_sks.h:50
Definition sopc_sk_manager.h:86