Main Content

exportClientCertificate

Copy OPC UA client application certificates to file

Since R2020a

Description

example

fileName = opc.ua.exportClientCertificate copies the toolbox SHA256 UA Client Application Certificate to the file MATLAB_OPCToolbox_SHA256.der in the user folder. The full path to the file is returned in fileName.

fileName = opc.ua.exportClientCertificate("SHA1") copies the toolbox SHA1 UA Client Application Certificate to the file MATLAB_OPCToolbox_SHA1.der in the user folder. Note that SHA1 is considered insecure by the OPC Foundation, and this certificate should be used only for backward compatibility. The full path to the file is returned in fileName.

fileName = opc.ua.exportClientCertificate("SHA256") copies the toolbox SHA256 UA Client Application Certificate to the file MATLAB_OPCToolbox_SHA256.der in the user folder. The full path to the file is returned in fileName.

opc.ua.exportClientCertificate("SHA1",FileName) or opc.ua.exportClientCertificate("SHA256",FileName) copies the corresponding toolbox UA Client Application Certificate to the file given by FileName. If the full path to FileName does not exist, the function attempts to create it. You can use the generated file to register the Client Application Certificate with any servers that require trusted certificates. The Client Application Certificate is exported in .der format.

Examples

collapse all

Export the SHA256 UA Client Application Certificate.

fName = opc.ua.exportClientCertificate("SHA256");

The generated file is named MATLAB_OPCToolbox_SHA256.der in the folder identified in fName.

Input Arguments

collapse all

Full path to generated certificate file, specified as a string or character vector.

Example: "C:\st4\certfile.der"

Data Types: char | string

Output Arguments

collapse all

File name with full path to location of exported certificate file.

Version History

Introduced in R2020a