Creating a Self-Signed Certificate and Key Pair
- Last UpdatedMar 24, 2017
- 2 minute read
The steps provided here use the OPC UA Sample Server and tools provided by the OPC Foundation for illustration and example purposes. You may use a different OPC UA server and configuration tools, but the main steps remain the same.
To create a self-signed OPC UA compliant certificate and key pair
-
Click the Start button on the Windows task bar and point to Programs.
-
Start the UA Configuration Utility. Point to the OPC Foundation folder that contains the sample applications.
-
Click UA 1.02, then Sample Applications, and then click UA Configuration Tool (OPC.UA.ConfigurationTool.exe). The UA Configuration Tool appears.
-
In the Application To Manage list box, enter Opc.Ua.SampleServer, if not pre-filled.

-
Click the Manage Application tab, and then click Create Application Certificate. The Create Certificate dialog box appears. Enter information in the appropriate text and list boxes.

-
Store Type: From the Store Type drop-down list, select Directory if your OPC UA client is running on the local computer.
-
Store Path: We recommend that you create a temporary directory to store and copy the certificate and the private key. For example, C:\Tmp\TestUACert. Otherwise, accept the default path or select another on your computer. In this example, we accept the default path.
-
CA Key File: Optional if you are creating a self-signed certificate.
-
CA Password: Optional if you are creating a self-signed certificate.
-
Application Name: The name of your OPC UA server.
-
Organization: Optional.
-
Application URI: The text box will be pre-filled with your OPC UA server. You can specify another using this format:
urn:<computer name>:<OPC UA server name> -
Subject Name: The text box will be pre-filled with your OPC UA server name. You can specify another using this format:
CN=<OPC UA server name>/DC=<computer name> -
Domains: Enter the computer/node name. You can use "localhost" if on the local computer.
-
Key Size: Select a key size from the list box.
-
Lifetime: Select a key lifetime in number of months.
-
Key Format: Select "PFX" from the list box.
-
-
Click OK.
The certificate and keys are created in \certs and \private subdirectories under the Store Path you specified in step 3b.