Skip to content

Commit 9a064d9

Browse files
committed
Adjust Unity TLS minimum and maximum versions (case 1338432)
With the new Mono version, corefx class libs do not use TLS default enum any longer. By default TLS None is used. With the original code the min would be greater than the max. That is an invalid scenario. This change defaults the min and max to the documented mbed tls defaults.
1 parent 2c6942c commit 9a064d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mcs/class/System/Mono.UnityTls/UnityTlsConversions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static UnityTls.unitytls_protocol GetMinProtocol (SslProtocols protocols)
2323
return UnityTls.unitytls_protocol.UNITYTLS_PROTOCOL_TLS_1_1;
2424
if (protocols.HasFlag (SslProtocols.Tls12))
2525
return UnityTls.unitytls_protocol.UNITYTLS_PROTOCOL_TLS_1_2;
26-
return UnityTls.unitytls_protocol.UNITYTLS_PROTOCOL_TLS_1_2; // Behavior as in AppleTlsContext
26+
return UnityTls.unitytls_protocol.UNITYTLS_PROTOCOL_TLS_1_0; // Use mbed tls min default
2727
}
2828

2929
public static UnityTls.unitytls_protocol GetMaxProtocol (SslProtocols protocols)
@@ -34,7 +34,7 @@ public static UnityTls.unitytls_protocol GetMaxProtocol (SslProtocols protocols)
3434
return UnityTls.unitytls_protocol.UNITYTLS_PROTOCOL_TLS_1_1;
3535
if (protocols.HasFlag (SslProtocols.Tls))
3636
return UnityTls.unitytls_protocol.UNITYTLS_PROTOCOL_TLS_1_0;
37-
return UnityTls.unitytls_protocol.UNITYTLS_PROTOCOL_TLS_1_0; // Behavior as in AppleTlsContext
37+
return UnityTls.unitytls_protocol.UNITYTLS_PROTOCOL_TLS_1_2; // Use mbed tls max default
3838
}
3939

4040
public static TlsProtocols ConvertProtocolVersion(UnityTls.unitytls_protocol protocol)

0 commit comments

Comments
 (0)