Encrypted Communication with Remote TargetVisu

You can run the visualization of a CODESYS project on a panel, which the Remote TargetVisu supports, with encrypted communication.

Installing a certificate and starting the encrypted Remote TargetVisu

Requirement

  • A controller with a visualization exists in the network and this controller is running.

  • A start visualization has been defined in the Remote TargetVisu object.

  • The program RemoteTargetVisu.exe is located on the panel.

  • The public certificate file (public key) is located on the panel and encoded as BASE64 or ASN1

  1. Run the program RemoteTargetVisu.exe with the option -installTrustedCert= <certificate path>. You can also specify the absolute path of the certificate (example: RemoteTargetVisu.exe --installTrustedCert=C:\\cert\\export\\example.cer).

    ⇒ A dialog prompt opens with the current certificate information. The access to the self-signed certificate of the PLC is activated.

    Note: This kind of installation is possible only with a standalone variant of the Remote TargetVisu.

  2. Run the program RemoteTargetVisu.exe with the option -continueAfterInstallTrustedCert.

    ⇒ The Remote TargetVisu starts as usual.

The optional command-line argument -omitInstallCertInfo makes it possible to skip the dialog box that displays the result of the certificate installation.

Example

This command-line command installs the certificate without issuing a message and then starts the Remote TargetVisu.

RemoteTargetVisu.exe --continueAfterInstallTrustedCert --omitInstallCertInfo --installTrustedCert=\UsbMemory\abc.cer

Communication configuration

The CFG file "CODESYSControl.cfg" is located on the PLC, for example in the folder "Platforms/Linux/Projects". There you can configure the communication as follows.

[CmpVisuHandlerRemote]

Communication.EncryptionMode=0

Connection via plain text communication

Default

Communication.EncryptionMode=1

Connection via encrypted communication

If you start the Remote TargetVisu with Communication.EncryptionMode=1 without having previously installed a certificate, then a dialog prompt with the certificate information is displayed after the start. When you click Yes to acknowledge the dialog, the Remote TargetVisu starts with encrypted communication. By default, the certificate, which can then be installed., is stored in the folder \\cert\\export.

See also