S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_pubsub_security.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
28#ifndef SOPC_PUBSUB_SECURITY_H_
29#define SOPC_PUBSUB_SECURITY_H_
30
32#include "sopc_enums.h"
33#include "sopc_pubsub_conf.h"
34#include "sopc_pubsub_sks.h"
35
39typedef struct SOPC_PubSub_SecurityType
40{
42 SOPC_CryptoProvider* provider;
43 SOPC_PubSubSKS_Keys* groupKeys;
44 SOPC_ExposedBuffer* msgNonceRandom;
45 uint32_t sequenceNumber;
46} SOPC_PubSub_SecurityType;
47
57typedef SOPC_PubSub_SecurityType* SOPC_UADP_GetSecurity_Func(uint32_t tokenId,
59 uint16_t writerGroupId);
60
66void SOPC_PubSub_Security_Clear(SOPC_PubSub_SecurityType* security);
67
77SOPC_Buffer* SOPC_PubSub_Security_Encrypt(const SOPC_PubSub_SecurityType* security, SOPC_Buffer* payload);
78
87SOPC_Buffer* SOPC_PubSub_Security_Decrypt(const SOPC_PubSub_SecurityType* keys, SOPC_Buffer* src, uint32_t size);
88
97SOPC_ReturnStatus SOPC_PubSub_Security_GetSignSize(const SOPC_PubSub_SecurityType* security,
98 bool enabled,
99 uint32_t* length);
100
109SOPC_ReturnStatus SOPC_PubSub_Security_Sign(const SOPC_PubSub_SecurityType* security, SOPC_Buffer* src);
110
126bool SOPC_PubSub_Security_Verify(const SOPC_PubSub_SecurityType* security, SOPC_Buffer* src, uint32_t payloadPosition);
127
128SOPC_ExposedBuffer* SOPC_PubSub_Security_Random(const SOPC_CryptoProvider* provider);
129
130#endif /* SOPC_PUBSUB_SECURITY_H_ */
Defines the cryptographic API. This API mainly relies on the SOPC_CryptoProvider, which is composed o...
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
SOPC_SecurityMode_Type
Definition sopc_pubsub_conf.h:103
PubSub Security Keys Service configuration: define the SOPC_SKManager to use to retrieve the keys.
uint8_t SOPC_ExposedBuffer
Definition sopc_secret_buffer.h:36
Bytes buffer structure.
Definition sopc_buffer.h:38
Definition sopc_pubsub_conf.h:118
The SOPC_CryptoProvider context.
Definition sopc_crypto_provider.h:43
Definition sopc_pubsub_sks.h:47