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 fileProtocolNone No security protocol will be used, a secure connection will not be established.
1 fileProtocolSSL2 The Secure Sockets Layer (SSL) version 2.0 protocol should be used. This protocol has been deprecated and is no longer widely used.
2 fileProtocolSSL3 The Secure Sockets Layer (SSL) version 3.0 protocol should be used.  This is currently the most common protocol used.
4 fileProtocolPCT1 The Private Communication Technology (PCT) version 1.0 protocol should be used. This protocol has been deprecated and is no longer widely used.
8 fileProtocolTLS1 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 value to fileProtocolTLS1 and attempt the connection again.

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.