Open the connection, specifying the use of TLS with the /TLS parameter.
MyConn is the device previously specified
SvrID can be a string that is a resolvable DNS name or an IP address
MyCfg is a saved (and activated) TLS configuration
This call opens a TCP connection to the loopback processor (that is, the local machine) on port 1000 using TLS. It uses TLS according to the characteristics specified by the MyCfg configuration.
Optionally, the call can include a password for the private key file:
Here, all the arguments are as above and MyPrivateKeyFilePassword is the actual password.
The ability to include a password when Open a TCP Connection Using TLS is for real-time interactive use only. You should never store a private key password persistently without protecting it. If you need to store such a password, use the PrivateKeyPassword property of the Security.SSLConfigsOpens in a new tab class.
For more information on opening a TCP device, see OPEN and USE Command Keywords for TCP Devices.