<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Ticket search results</title><link>https://forge.codesys.com/lib/cobolt/questions/</link><description>You searched for labels:"TLS"</description><language>en</language><lastBuildDate>Mon, 28 Dec 2020 23:14:33 -0000</lastBuildDate><item><title>Various tested SparkplugB, MQTT TLS Security scenario's</title><link>https://forge.codesys.com/lib/cobolt/questions/5/</link><description>Hi There,

This mini FAQ will to help/assist you setting up your SparkplugB MQTT TLS Channel Encryption.
We have **Successfully** tested various scenario's using MQTT Client SL v1.0.2.0.
The example will be updated shortly to accommodate these tests.

* Tested against library v1.3.3.0 
* Using example v1.3.3.0 slight modifications to the example code may apply, see below for details

TLS with client certificate on server 'test.mosquitto.org';
~~~
            ServerUrl                     := 'test.mosquitto.org';
            ServerPort                    := 8884;
            KeepAlive                     := 60; // In seconds
            Username                      := "";
            Password                      := "";
            getClientCert.sCommonName     := 'EdgeOfNetworkNode1';
            getClientCert.sCountry        := 'NL';
            getClientCert.sOrganization   := '****'; // intentionally redacted
            UseTLS                        := TRUE;
            hCert                         := SysTypes.RTS_INVALID_HANDLE; //no client cert
            StillGettingClientCertificate := TRUE;
~~~


TLS without client certificate on server 'xxxxxx' 
~~~
            ServerUrl                     := 'xxxxxx'; // intentionally redacted
            ServerPort                    := 8883;
            KeepAlive                     := 60; // In seconds
            Username                      := "xxxxxx"; // intentionally redacted
            Password                      := "xxxxxx"; // intentionally redacted
            getClientCert.sCommonName     := '';
            getClientCert.sCountry        := '';
            getClientCert.sOrganization   := '';
            UseTLS                        := TRUE;
            hCert                         := SysTypes.RTS_INVALID_HANDLE; //no client cert
            StillGettingClientCertificate := FALSE;
~~~

TLS with client certificate on server 'xxxxxx' 
~~~
            ServerUrl                     := 'xxxxxx'; // intentionally redacted
            ServerPort                    := 8883;
            KeepAlive                     := 60; // In seconds
            Username                      := "xxxxxx"; // intentionally redacted
            Password                      := "xxxxxx"; // intentionally redacted
            getClientCert.sCommonName     := '';
            getClientCert.sCountry        := '';
            getClientCert.sOrganization   := '';
            UseTLS                        := TRUE;
            hCert                         := SysTypes.RTS_INVALID_HANDLE; //no client cert
            StillGettingClientCertificate := FALSE;
            
            // Additional mandatory TLSContextProvider settings
            sUseCaseName                  := 'u1',
            ePurpose                      := SparkplugB.MQTT.NBS.Purpose.Client_Side,
            sHostname                     := 'xxxxxx', // intentionally redacted
            udiVerificationMode           := 2);
            
            &gt; NOTE: wait, yet more additional mandatory requirements!
            &gt; Download Security Agent Package
            &gt; Drag the xxxxxx certificate from SecurityAgent =&gt; Devices =&gt;  Qarantine... to SecurityAgent =&gt; Devices =&gt; Trusted
~~~</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hermsen</dc:creator><pubDate>Mon, 28 Dec 2020 23:14:33 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com/lib/cobolt/questions/5/</guid></item></channel></rss>