Skip to content
Start free evaluation

pdcomm_opcua_client_options

Struct

Client connection options (structure version 1).

typedef struct pdcomm_opcua_client_options { ... } pdcomm_opcua_client_options

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

Set struct_size to sizeof(pdcomm_opcua_client_options) and version to 1, then call pdcomm_opcua_client_options_init() for the defaults: #PDCOMM_OPCUA_AES256SHA256RSAPSS with #PDCOMM_OPCUA_SIGN_AND_ENCRYPT, a 10000 ms timeout, no flags, the application URI urn:pdcomm:opcua:client and empty certificates.

Nothing is trusted automatically: a secure connection needs the client's application instance certificate and key, and the server certificate as an explicit trust anchor. All byte ranges are read and copied during pdcomm_opcua_client_connect() only.

A larger struct_size from a newer header is accepted and its tail is left untouched; a smaller size or another version is rejected.

Members

application_uri

Field

ApplicationUri, at most 4096 bytes; empty means urn:pdcomm:opcua:client.

pdcomm_opcua_bytes application_uri

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

It must match the URI in the client certificate.

certificate_der

Field

Client application instance certificate (DER, at most 64 KiB); required unless the policy is None.

pdcomm_opcua_bytes certificate_der

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

flags

Field

Bitwise OR of ::pdcomm_opcua_option_flags values.

uint32_t flags

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

mode

Field

Requested ::pdcomm_opcua_security_mode value.

uint32_t mode

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

policy

Field

Requested ::pdcomm_opcua_policy value.

uint32_t policy

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

private_key_pem

Field

Private key of that certificate (PEM, at most 64 KiB).

pdcomm_opcua_bytes private_key_pem

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

Copied during connect; wipe the caller's copy afterwards.

struct_size

Field

Size of this structure in bytes as known by the caller.

uint32_t struct_size

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

timeout_ms

Field

Timeout of each network exchange and of each outstanding request, 1 to 300000 ms.

uint32_t timeout_ms

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

trusted_server_der

Field

Server certificate to trust (DER, at most 64 KiB); the only trust anchor of this client.

pdcomm_opcua_bytes trusted_server_der

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>

version

Field

Structure version; must be 1.

uint32_t version

Declared in: #include <pdcomm/opcua/pdcomm_opcua.h>