SecureProtocol Property  
 

Gets and sets the security protocol used to establish the secure connection with the server.

Syntax

object.SecureProtocol [= protocol ]

Remarks

The SecureProtocol property can be used to specify the security protocol to be used when establishing a secure connection with a server. By default, the control will attempt to use TLS 1.3 to establish the connection. If TLS 1.3 is not supported, TLS 1.2 will be used. The appropriate protocol is automatically selected based on the capabilities of both the client and server.

It is recommended that you only change this property value if you fully understand the implications of doing so. Assigning a value to this property will override the default and force the control to attempt to use only the protocol specified. One or more of the following values may be used:

Value Description
stProtocolNone No security protocol has been selected. A secure connection has not been established.
stProtocolTLS10 The TLS 1.0 protocol should be used when establishing a secure connection. This version is supported on all Windows platforms, however some servers may reject connections using version 1.0 in favor of using version 1.2. This version should only be used for backwards compatibility with older servers that have not been updated to use the current version of TLS.
stProtocolTLS11 The TLS 1.1 protocol should be used when establishing a secure connection. This version is supported on Windows 7 and later desktop platforms, and Windows Server 2008 R2 and later server platforms. Some servers may reject connections using version 1.1 in favor of using version 1.2. This version should only be used for backwards compatibility with older servers that have not been updated to use the current version of TLS.
stProtocolTLS12 The TLS 1.2 protocol should be used when establishing a secure connection. This version is supported on Windows 7 and later desktop platforms, and Windows Server 2008 R2 and later server platforms. This version of TLS offers the broadest compatibility with most servers.
stProtocolTLS13 The TLS 1.3 protocol should be used when establishing a secure connection. This is the newest version of the protocol and is only supported on Windows 11, Windows Server 2022 and later versions of Windows. If this version is not supported by the operating system, TLS 1.2 will be used instead.

Multiple security protocols may be specified by combining them using a bitwise Or operator. After a connection has been established, reading this property will identify the protocol that was selected to establish the connection. Attempting to set this property after a connection has been established will result in an exception being thrown. This property should only be set after setting the Secure property to True and before calling the Connect method.

Data Type

Integer (Int32)

See Also

CipherStrength Property, HashStrength Property, Secure Property, SecureCipher Property, SecureHash Property, SecureKeyExchange Property