Skip to content

Commit 9982bbf

Browse files
authored
Ensure certificate validation works on Mac/Linux (#954)
In 65cead2 we removed the .NET Standard target in favour of a direct .NET 6 target, however we missed this conditional compilation symbol referrering to `NETSTANDARD`.
2 parents df9a165 + c0f5a38 commit 9982bbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shared/Core/HttpClientFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public HttpClient CreateClient()
8585

8686
#if NETFRAMEWORK
8787
ServicePointManager.ServerCertificateValidationCallback = (req, cert, chain, errors) => true;
88-
#elif NETSTANDARD
88+
#else
8989
handler.ServerCertificateCustomValidationCallback = (req, cert, chain, errors) => true;
9090
#endif
9191
}
@@ -174,7 +174,7 @@ public HttpClient CreateClient()
174174
return validationCallback(cert2, chain, errors);
175175
}
176176
};
177-
#elif NETSTANDARD
177+
#else
178178
handler.ServerCertificateCustomValidationCallback = (_, cert, chain, errors) => validationCallback(cert, chain, errors);
179179
#endif
180180
}

0 commit comments

Comments
 (0)