Skip to content

Commit

Permalink
Ensure certificate validation works on Mac/Linux (#954)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
ldennington committed Nov 10, 2022
2 parents df9a165 + c0f5a38 commit 9982bbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/Core/HttpClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public HttpClient CreateClient()

#if NETFRAMEWORK
ServicePointManager.ServerCertificateValidationCallback = (req, cert, chain, errors) => true;
#elif NETSTANDARD
#else
handler.ServerCertificateCustomValidationCallback = (req, cert, chain, errors) => true;
#endif
}
Expand Down Expand Up @@ -174,7 +174,7 @@ public HttpClient CreateClient()
return validationCallback(cert2, chain, errors);
}
};
#elif NETSTANDARD
#else
handler.ServerCertificateCustomValidationCallback = (_, cert, chain, errors) => validationCallback(cert, chain, errors);
#endif
}
Expand Down

0 comments on commit 9982bbf

Please sign in to comment.