The function block FB_InstallCertificateFromString is used to install a certificate from a string on the controller. The certificate to be installed must be provided in the standard Base64 format.
For a certificate which is installed with trust level Own, the corresponding private key is required on the controller. The private key is created when a certificate or the CSR is created on the controller. An externally created certificate or a certificate issued based on an externally created CSR cannot be used as Own certificate.
If the private key is not available, an error will be detected when the certificate is processed by the supported communication function blocks, for example the FB_TcpServer2 of the TcpUdpCommunication library.
A certificate is deleted as follows:
By executing the corresponding command from the Security Screen editor of EcoStruxure Machine Expert. For further information, refer to the description of the Security Screen editor in the Menu Commands online help..
By executing the Reset Origin Device command. For further information, refer to the description of the Reset Origin Device command in the Menu Commands online help..
Input |
Data type |
Description |
---|---|---|
i_xExecute |
BOOL |
A rising edge of the input i_xExecute starts the execution of the function block. Refer to Behavior of Function Blocks with the Input i_xExecute. |
i_sCertificate |
STRING[2048] |
The certificate in the standard Base64 format. |
i_etTrustLevel |
ET_TrustLevel |
The enumeration describing the trust level of the certificate. |
i_timTimeout |
TIME (TIME#10s0ms) |
Timeout for the operation. If the specified time expires during execution, the process is aborted. The minimum value for the timeout is 10 s. |
Output |
Data type |
Description |
---|---|---|
q_xDone |
BOOL |
If this output is set to TRUE, the execution has been completed successfully. |
q_xBusy |
BOOL |
If this output is set to TRUE, the function block execution is in progress. |
q_xError |
BOOL |
If this output is set to TRUE, an error has been detected. For details, refer to q_etResult and q_etResultMsg. |
q_etResult |
ET_Result |
Provides diagnostic and status information as a numeric value. |
q_sResultMsg |
STRING [80] |
Provides additional diagnostic and status information as a text message. |