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 either SSL v3 or TLS v1 to establish the connection, with the appropriate protocol automatically selected based on the capabilities of the 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 Constant Description
0 stProtocolNone No security protocol has been selected. A secure connection has not been established with the server.
1 stProtocolSSL2 The Secure Sockets Layer (SSL) version 2.0 protocol has been selected. Note that this protocol has been deprecated and is no longer widely used. It is not recommended that this protocol be used when establishing secure connections.
2 stProtocolSSL3 The Secure Sockets Layer (SSL) version 3.0 protocol has been selected. This version of the protocol, and version 1.0 of the Transport Layer Security (TLS) protocol, are the most commonly used security protocols.
4 stProtocolPCT1 The Transport Layer Security (TLS) version 1.0 protocol has been selected. This version of the protocol, and version 3.0 of the Secure Sockets Layer (SSL) protocol, are the most commonly used security protocols.
8 stProtocolTLS1 The Transport Layer Security (TLS) version 1.0 protocol should be used.

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.

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 stProtocolTLS1 and attempt the connection again.

Note that a Secure Edition license is required to establish a secure connection to a remote server.

Data Type

Integer

See Also

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


Copyright © 2008 Catalyst Development Corporation. All rights reserved.