open62541 1.3.12
Open source implementation of OPC UA
Loading...
Searching...
No Matches
server_config_default.h File Reference
#include <open62541/server.h>

Go to the source code of this file.

Functions

_UA_BEGIN_DECLS UA_ServerUA_Server_new (void)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_setMinimalCustomBuffer (UA_ServerConfig *config, UA_UInt16 portNumber, const UA_ByteString *certificate, UA_UInt32 sendBufferSize, UA_UInt32 recvBufferSize)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_setDefaultWithSecurityPolicies (UA_ServerConfig *conf, UA_UInt16 portNumber, const UA_ByteString *certificate, const UA_ByteString *privateKey, const UA_ByteString *trustList, size_t trustListSize, const UA_ByteString *issuerList, size_t issuerListSize, const UA_ByteString *revocationList, size_t revocationListSize)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_setBasics (UA_ServerConfig *conf)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_addNetworkLayerTCP (UA_ServerConfig *conf, UA_UInt16 portNumber, UA_UInt32 sendBufferSize, UA_UInt32 recvBufferSize)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyNone (UA_ServerConfig *config, const UA_ByteString *certificate)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyBasic128Rsa15 (UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyBasic256 (UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyBasic256Sha256 (UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyAes128Sha256RsaOaep (UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_addAllSecurityPolicies (UA_ServerConfig *config, const UA_ByteString *certificate, const UA_ByteString *privateKey)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_addEndpoint (UA_ServerConfig *config, const UA_String securityPolicyUri, UA_MessageSecurityMode securityMode)
 
UA_EXPORT UA_StatusCode UA_ServerConfig_addAllEndpoints (UA_ServerConfig *config)
 

Variables

const UA_ConnectionConfig UA_ConnectionConfig_default
 

Function Documentation

◆ UA_Server_new()

_UA_BEGIN_DECLS UA_Server * UA_Server_new ( void )

This work is licensed under a Creative Commons CCZero 1.0 Universal License.

See http://creativecommons.org/publicdomain/zero/1.0/ for more information.

Copyright 2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer) Copyright 2017 (c) Stefan Profanter, fortiss GmbH Copyright 2018 (c) Mark Giraud, Fraunhofer IOSB Copyright 2019 (c) Kalycito Infotech Private Limited Create a new server with default plugins for logging etc. used during initialization. No network layer and SecurityPolicies are set so far.

◆ UA_ServerConfig_setMinimalCustomBuffer()

UA_EXPORT UA_StatusCode UA_ServerConfig_setMinimalCustomBuffer ( UA_ServerConfig * config,
UA_UInt16 portNumber,
const UA_ByteString * certificate,
UA_UInt32 sendBufferSize,
UA_UInt32 recvBufferSize )

Default Server Config.

Creates a new server config with one endpoint and custom buffer size.

The config will set the tcp network layer to the given port and adds a single endpoint with the security policy SecurityPolicy#None to the server. A server certificate may be supplied but is optional. Additionally you can define a custom buffer size for send and receive buffer.

Parameters
portNumberThe port number for the tcp network layer
certificateOptional certificate for the server endpoint. Can be NULL.
sendBufferSizeThe size in bytes for the network send buffer
recvBufferSizeThe size in bytes for the network receive buffer

◆ UA_ServerConfig_setDefaultWithSecurityPolicies()

UA_EXPORT UA_StatusCode UA_ServerConfig_setDefaultWithSecurityPolicies ( UA_ServerConfig * conf,
UA_UInt16 portNumber,
const UA_ByteString * certificate,
const UA_ByteString * privateKey,
const UA_ByteString * trustList,
size_t trustListSize,
const UA_ByteString * issuerList,
size_t issuerListSize,
const UA_ByteString * revocationList,
size_t revocationListSize )

◆ UA_ServerConfig_setBasics()

UA_EXPORT UA_StatusCode UA_ServerConfig_setBasics ( UA_ServerConfig * conf)

Creates a new server config with no network layer and no endpoints.

It initializes reasonable defaults for many things, but does not add any network layer, security policies and endpoints. Use the various UA_ServerConfig_addXxx functions to add them.

Parameters
confThe configuration to manipulate

◆ UA_ServerConfig_addNetworkLayerTCP()

UA_EXPORT UA_StatusCode UA_ServerConfig_addNetworkLayerTCP ( UA_ServerConfig * conf,
UA_UInt16 portNumber,
UA_UInt32 sendBufferSize,
UA_UInt32 recvBufferSize )

Adds a TCP network layer with custom buffer sizes.

Parameters
confThe configuration to manipulate
portNumberThe port number for the tcp network layer
sendBufferSizeThe size in bytes for the network send buffer. Pass 0 to use defaults.
recvBufferSizeThe size in bytes for the network receive buffer. Pass 0 to use defaults.

◆ UA_ServerConfig_addSecurityPolicyNone()

UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyNone ( UA_ServerConfig * config,
const UA_ByteString * certificate )

Adds the security policy SecurityPolicy#None to the server.

A server certificate may be supplied but is optional.

Parameters
configThe configuration to manipulate
certificateThe optional server certificate.

◆ UA_ServerConfig_addSecurityPolicyBasic128Rsa15()

UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyBasic128Rsa15 ( UA_ServerConfig * config,
const UA_ByteString * certificate,
const UA_ByteString * privateKey )

Adds the security policy SecurityPolicy#Basic128Rsa15 to the server.

A server certificate may be supplied but is optional.

Certificate verification should be configured before calling this function. See PKI plugin.

Parameters
configThe configuration to manipulate
certificateThe server certificate.
privateKeyThe private key that corresponds to the certificate.

◆ UA_ServerConfig_addSecurityPolicyBasic256()

UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyBasic256 ( UA_ServerConfig * config,
const UA_ByteString * certificate,
const UA_ByteString * privateKey )

Adds the security policy SecurityPolicy#Basic256 to the server.

A server certificate may be supplied but is optional.

Certificate verification should be configured before calling this function. See PKI plugin.

Parameters
configThe configuration to manipulate
certificateThe server certificate.
privateKeyThe private key that corresponds to the certificate.

◆ UA_ServerConfig_addSecurityPolicyBasic256Sha256()

UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyBasic256Sha256 ( UA_ServerConfig * config,
const UA_ByteString * certificate,
const UA_ByteString * privateKey )

Adds the security policy SecurityPolicy#Basic256Sha256 to the server.

A server certificate may be supplied but is optional.

Certificate verification should be configured before calling this function. See PKI plugin.

Parameters
configThe configuration to manipulate
certificateThe server certificate.
privateKeyThe private key that corresponds to the certificate.

◆ UA_ServerConfig_addSecurityPolicyAes128Sha256RsaOaep()

UA_EXPORT UA_StatusCode UA_ServerConfig_addSecurityPolicyAes128Sha256RsaOaep ( UA_ServerConfig * config,
const UA_ByteString * certificate,
const UA_ByteString * privateKey )

Adds the security policy SecurityPolicy#Aes128Sha256RsaOaep to the server.

A server certificate may be supplied but is optional.

Certificate verification should be configured before calling this function. See PKI plugin.

Parameters
configThe configuration to manipulate
certificateThe server certificate.
privateKeyThe private key that corresponds to the certificate.

◆ UA_ServerConfig_addAllSecurityPolicies()

UA_EXPORT UA_StatusCode UA_ServerConfig_addAllSecurityPolicies ( UA_ServerConfig * config,
const UA_ByteString * certificate,
const UA_ByteString * privateKey )

Adds all supported security policies and sets up certificate validation procedures.

Certificate verification should be configured before calling this function. See PKI plugin.

Parameters
configThe configuration to manipulate
certificateThe server certificate.
privateKeyThe private key that corresponds to the certificate.
trustListThe trustList for client certificate validation.
trustListSizeThe trustList size.
revocationListThe revocationList for client certificate validation.
revocationListSizeThe revocationList size.

◆ UA_ServerConfig_addEndpoint()

UA_EXPORT UA_StatusCode UA_ServerConfig_addEndpoint ( UA_ServerConfig * config,
const UA_String securityPolicyUri,
UA_MessageSecurityMode securityMode )

Adds an endpoint for the given security policy and mode.

The security policy has to be added already. See UA_ServerConfig_addXxx functions.

Parameters
configThe configuration to manipulate
securityPolicyUriThe security policy for which to add the endpoint.
securityModeThe security mode for which to add the endpoint.

◆ UA_ServerConfig_addAllEndpoints()

UA_EXPORT UA_StatusCode UA_ServerConfig_addAllEndpoints ( UA_ServerConfig * config)

Adds endpoints for all configured security policies in each mode.

Parameters
configThe configuration to manipulate

Variable Documentation

◆ UA_ConnectionConfig_default

const UA_ConnectionConfig UA_ConnectionConfig_default
extern

Default Connection.