From e3979d9ae91d57d20da9c8dea0be12f8c76142b1 Mon Sep 17 00:00:00 2001 From: Alex Thibodeau Date: Mon, 19 Apr 2021 16:07:14 -0400 Subject: [PATCH] Temporary workaround to get artifacts downloading on old build agents until they are upgraded. --- mcs/class/System/Mono.Btls/MonoBtlsProvider.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mcs/class/System/Mono.Btls/MonoBtlsProvider.cs b/mcs/class/System/Mono.Btls/MonoBtlsProvider.cs index 97c50aacab91..346d73be6de3 100644 --- a/mcs/class/System/Mono.Btls/MonoBtlsProvider.cs +++ b/mcs/class/System/Mono.Btls/MonoBtlsProvider.cs @@ -149,6 +149,12 @@ internal override bool ValidateCertificate ( X509CertificateCollection certificates, bool wantsChain, ref X509Chain chain, ref SslPolicyErrors errors, ref int status11) { + // Super ugly hack to make things work on Unity build servers + // FIXME: REMOVE THIS WHEN AGENTS RUN NEWER LINUX + if (Environment.OSVersion.Platform == PlatformID.Unix + && Environment.GetEnvironmentVariable ("UNITY_THISISABUILDMACHINE") != null) + return true; + if (chain != null) { var chainImpl = (X509ChainImplBtls)chain.Impl; var success = chainImpl.StoreCtx.VerifyResult == 1;