TLSVersion

This property enforces the connection to use a specific SSL/TLS version.

Declaration

// C#
public static string TLSVersion { get; set; }

Property Type

System.String

Description

Supported values are: undetermined |1.2|TLSv1.2|1.3|TLSv1.3. To specify more than one SSL/TLS version, enclose the version numbers between parentheses and separate the values with a comma. For example, (1.2,1.3).

Starting with ODP.NET 23.9, you can specify a minimum TLS version by appending the plus (+) sign after the version, such as 1.2+ or TLSv1.2+. This value indicates to use TLS 1.2 or higher, whichever highest version the database server supports.

In some cases, apps may want to set a minimum TLS version, but not support one or more higher versions. To identify excluded versions, set the TLSExcludeVersion property on OracleConfiguration, OracleConnection, or equivalent.

The default value is an undetermined version. An undetermined version means ODP.NET is allowed to use any TLS version, this property is allowed to specify. An exception will be thrown for invalid value.

This property overrides the SSL_VERSION parameter.

Example

OracleConfiguration.TLSVersion = 1.2+;