Skip to content

Commit fc103d6

Browse files
committed
Reordering selection of TLS providers to give preference to the Unity TLS provider over the other available ones. In a Unity runtime we want to always use our own if it is available.
1 parent f686c26 commit fc103d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,17 +333,17 @@ static MobileTlsProvider CreateDefaultProviderImpl ()
333333
switch (type) {
334334
case "default":
335335
case "legacy":
336+
#if UNITY
337+
if (Mono.Unity.UnityTls.IsSupported)
338+
goto case "unitytls";
339+
#endif
336340
#if MONO_FEATURE_APPLETLS
337341
if (Platform.IsMacOS)
338342
goto case "apple";
339343
#endif
340344
#if MONO_FEATURE_BTLS
341345
if (IsBtlsSupported ())
342346
goto case "btls";
343-
#endif
344-
#if UNITY
345-
if (Mono.Unity.UnityTls.IsSupported)
346-
goto case "unitytls";
347347
#endif
348348
throw new NotSupportedException ("TLS Support not available.");
349349
#if MONO_FEATURE_APPLETLS

0 commit comments

Comments
 (0)