S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
libs2opc_client_config_custom.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 LIBS2OPC_CLIENT_CONFIG_CUSTOM_H_
29#define LIBS2OPC_CLIENT_CONFIG_CUSTOM_H_
30
31#include <stdbool.h>
32
35
51SOPC_ReturnStatus SOPC_ClientConfigHelper_SetPreferredLocaleIds(size_t nbLocales, const char** localeIds);
52
69 const char* productUri,
70 const char* defaultAppName,
71 const char* defaultAppNameLocale,
72 OpcUa_ApplicationType applicationType);
73
89
104 const char* clientKeyPath,
105 bool encrypted);
106
122 const unsigned char* clientCertificate,
123 size_t keyNbBytes,
124 const unsigned char* clientPrivateKey);
125
152 const char* endpointUrl,
154 SOPC_SecurityPolicy_URI secuPolicy);
155
171 SOPC_SecureConnection_Config* secConnConfig,
172 const OpcUa_GetEndpointsResponse* getEndpointsResponse);
173
187 const char* clientReverseEndpointUri);
188
202 uint32_t reqLifetime);
203
216 const char* serverCertPath);
217
232 size_t certificateNbBytes,
233 const unsigned char* serverCertificate);
234
250 const char* userPolicyId);
251
270 const char* userPolicyId,
271 const char* userName,
272 const char* password);
273
290 const char* userPolicyId,
291 const char* userCertPath,
292 const char* userKeyPath,
293 bool encrypted);
294
312 const char* userPolicyId,
313 size_t certificateNbBytes,
314 const unsigned char* userCertificate,
315 size_t keyNbBytes,
316 const unsigned char* userPrivateKey);
317
335 SOPC_KeyCertPairUpdateCb* serverCertUpdateCb,
336 uintptr_t updateParam);
337
348 SOPC_SecureConnection_Config*** scConfigArray);
349
350#endif
High level interface to configure an OPC UA client.
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetServerCertificateFromBytes(SOPC_SecureConnection_Config *secConnConfig, size_t certificateNbBytes, const unsigned char *serverCertificate)
Defines the server certificate DER encoded bytes to be used to establish the secure connection.
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetUserName(SOPC_SecureConnection_Config *secConnConfig, const char *userPolicyId, const char *userName, const char *password)
Defines the user authentication mode as username/password for the secure connection,...
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetUserX509FromPaths(SOPC_SecureConnection_Config *secConnConfig, const char *userPolicyId, const char *userCertPath, const char *userKeyPath, bool encrypted)
Defines the user authentication mode as X509 certificate for the secure connection,...
SOPC_SecureConnection_Config * SOPC_ClientConfigHelper_CreateSecureConnection(const char *userDefinedId, const char *endpointUrl, OpcUa_MessageSecurityMode secuMode, SOPC_SecurityPolicy_URI secuPolicy)
Creates a new secure channel configuration in client that shall be completed by using the functions b...
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetKeyCertPairFromPath(const char *clientCertPath, const char *clientKeyPath, bool encrypted)
Sets asymmetrical certificate and key of client from file paths. Certificate files shall use DER form...
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetUserX509FromBytes(SOPC_SecureConnection_Config *secConnConfig, const char *userPolicyId, size_t certificateNbBytes, const unsigned char *userCertificate, size_t keyNbBytes, const unsigned char *userPrivateKey)
Sets asymmetrical certificate and key of user from byte arrays. Certificate shall be in DER format,...
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetServerCertificateFromPath(SOPC_SecureConnection_Config *secConnConfig, const char *serverCertPath)
Defines the server certificate DER file path to be used to establish the secure connection.
SOPC_ReturnStatus SOPC_ClientConfigHelper_GetSecureConnectionConfigs(size_t *nbScConfigs, SOPC_SecureConnection_Config ***scConfigArray)
Gets the configured secure connections array.
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetReverseConnection(SOPC_SecureConnection_Config *secConnConfig, const char *clientReverseEndpointUri)
Sets the Secure Connection in reverse connection mode.
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetReqLifetime(SOPC_SecureConnection_Config *secConnConfig, uint32_t reqLifetime)
Defines the lifetime requested to the server for this secure connection (symmetric keys renewal) A de...
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetPreferredLocaleIds(size_t nbLocales, const char **localeIds)
Client configuration without XML.
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetPKIprovider(SOPC_PKIProvider *pki)
Defines the PKI provider that will be in charge of validating certificates received by client.
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetServerCertUpdateCb(SOPC_SecureConnection_Config *secConnConfig, SOPC_KeyCertPairUpdateCb *serverCertUpdateCb, uintptr_t updateParam)
Sets the callback to be called if the server certificate held by SOPC_CertHolder is updated at runtim...
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetExpectedEndpointsDescription(SOPC_SecureConnection_Config *secConnConfig, const OpcUa_GetEndpointsResponse *getEndpointsResponse)
Defines the Secure Connection expected EndpointsDescription from given GetEndpointsResponse....
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetApplicationDescription(const char *applicationUri, const char *productUri, const char *defaultAppName, const char *defaultAppNameLocale, OpcUa_ApplicationType applicationType)
Defines client application description.
SOPC_ReturnStatus SOPC_SecureConnectionConfig_SetAnonymous(SOPC_SecureConnection_Config *secConnConfig, const char *userPolicyId)
Defines the user authentication mode as anonymous for the secure connection and set the associated us...
SOPC_ReturnStatus SOPC_ClientConfigHelper_SetKeyCertPairFromBytes(size_t certificateNbBytes, const unsigned char *clientCertificate, size_t keyNbBytes, const unsigned char *clientPrivateKey)
Sets asymmetrical certificate and key of client from byte arrays. Certificate shall be in DER format,...
High level interface to configure an OPC UA client and/or server.
SOPC_SecurityPolicy_URI
Enumerated values authorized for use with SOPC_EndpointConfig_AddSecurityConfig or SOPC_ClientConfigH...
Definition libs2opc_common_config.h:42
enum _OpcUa_ApplicationType OpcUa_ApplicationType
enum _OpcUa_MessageSecurityMode OpcUa_MessageSecurityMode
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
void SOPC_KeyCertPairUpdateCb(uintptr_t updateParam)
Type of the callback triggered on key / certificate update.
Definition sopc_key_cert_pair.h:46
The PKIProvider object for the Public Key Infrastructure.
Definition sopc_pki_struct_lib_internal.h:39
Structure representing a secure connection configuration (secure channel + session) which allow to es...
Definition sopc_user_app_itf.h:216
Definition sopc_types.h:2434