ST_IotMqttTLS
TLS security setting for the MQTT client.
Either CA (certificate authority) or PSK (PreSharedKey) can be used.
Syntax
Definition:
TYPE ST_IotMqttTls :
STRUCT
sCA : STRING(255); // certificate authority as filename (PEM or DER format) or as string (PEM)
sCAPath : STRING(255); // for future use
sCert : STRING(255); // client certificate as filename (PEM or DER format) or as string (PEM)
sKeyFile : STRING(255);
sKeyPwd : STRING(255);
sCrl : STRING(255); // Certificate Revocation List as filename (PEM or DER format) or as string (PEM)
sCiphers : STRING(255);
sVersion : STRING(80) := 'tlsv1.2'; // TLS version
bNoServerCertCheck : BOOL := FALSE;
sPskIdentity : STRING(255);
aPskKey : ARRAY[1..64] OF BYTE;
nPskKeyLen : USINT;
sAzureSas : STRING(511);
END_STRUCT
END_TYPE
Parameters
Name | Type | Description |
---|---|---|
sCA | STRING(255) | Certificate of the certificate authority (CA) |
sCert | STRING(255) | Client certificate to be used for authentication at the broker |
sKeyFile | STRING(255) | Private key of the client |
sKeyPwd | STRING(255) | Password of the private key, if applicable |
sCrl | STRING(255) | Path to the certificate revocation list, which may be present in PEM or DER format |
sCiphers | STRING(255) | Cipher suites to be used, specified in OpenSSL string format |
sVersion | STRING(80) | TLS version to be used |
bNoServerCertCheck | BOOL | Disables verification of the server certificate validity. If communication is to take place without TLS encryption, this value must remain FALSE. |
sPskIdentity | STRING(255) | PreSharedKey identity for TLS PSK connection |
aPskKey | ARRAY[1..64] OF BYTE | PreSharedKey for TLS PSK connection |
nPskKeyLen | USINT | Length of the PreSharedKey in bytes |
sAzureSAS | STRING(511) | SAS token for connection to the Microsoft Azure IoT Hub |