• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Protocols - OPC UA I/O
  • OPC UA TLS Certificate Setup
  • 5.0.0

Event Conversion ChaiScripts OPC UA Server Discovery

OPC UA TLS Certificate Setup

OPC UA TLS Certificate Setup

To prevent information leakage and unintentional access via OPC UA over network, authentication and encryption should always be used.

To use OPC UA SecurityMode Sign or Sign&Encrypt, both server and client must have private keys and corresponding public certificates. These can be generated using any X.509 certificate management tool. The following examples describe how to use OpenSSL to generate these.

Note: The following examples assume you have the OpenSSL software installed in your computer.

Generating Server and Client Keys and TLS Certificates

To generate the OPC UA server or client private key and corresponding self-signed certificate, use following OpenSSL command:

openssl req -new -x509 -addext "subjectAltName = URI:Your Application OPC-UA URI" -keyout endpoint.key -nodes
  -outform DER -days 365 -out endpoint.crt

Run this command once for the server (by replacing endpoint with your server name) and once for each client (by replacing endpoint with your client name). Also replace Your Application OPC-UA URI with the actual URI of your server or client OPC-UA application.

Note: You can choose not set the subjectAltName of the certificate (by removing -addext parameter from the command) but then you have to set TLSAllowURIMismatch on OPC UA server and client to disable certificate URI verification.

Setting Up TLS Certificates

With the server and client keys and certificates generated, the server and the client must be configured to use them.

  • copy the server key and certificate files and also the client certificate files into the CDP application folder
  • add these files to the application project in CDP Studio by right-clicking in Code mode on the application name and choosing "Add existing files..."
  • in Configure mode set TLSServerCertFile and TLSServerKeyFile to server certificate and key file name.
  • also add AllowedClient for all clients and set their TLSClientCertFile to corresponding client certificate filename

Event Conversion ChaiScripts OPC UA Server Discovery

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top