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.
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);
> NOTE: wait, yet more additional mandatory requirements!
> Download Security Agent Package
> Drag the xxxxxx certificate from SecurityAgent => Devices => Qarantine... to SecurityAgent => Devices => Trusted
Diff: