SocketTools .NET Edition

PopClient.SecureProtocol Property

Gets and sets a value which specifies the protocol used for a secure connection.

[Visual Basic]
Public Property SecureProtocol As SecurityProtocols
[C#]
public PopClient.SecurityProtocols SecureProtocol {get; set;}

Property Value

A SecurityProtocols enumeration value which identifies the protocol to be used when establishing a secure connection.

Remarks

The SecureProtocol property can be used to specify the security protocol to be used when establishing a secure connection with a server or accepting a secure connection from a client. By default, the class will attempt to use either TLS 1.2 or TLS 1.3 to establish the connection, with the appropriate protocol automatically selected based on the capabilities of the remote host. 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 protocol and force the class to attempt to use only the protocol specified.

Multiple security protocols may be specified by combining them using a bitwise or operator. After a connection has been established, this property will identify the protocol that was selected. 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 Accept or Connect methods.

In some cases, a server may only accept a secure connection if the TLS v1 protocol is specified. If the security protocol is not compatible with the server, then the connection will fail with an error indicating that the control is unable to establish a security context for the session. In this case, try assigning the property to protocolTLS1 and attempt the connection again.

See Also

PopClient Class | SocketTools Namespace