.NET Core behaves differently on Windows and Linux. Maybe wait until it gets fixed?
3de217f
SslStream httpsStream;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
httpsStream = new SslStream(stream, leaveInnerStreamOpen: true);
else // TODO: Fix this security vulnerability
{
httpsStream = new SslStream(
stream,
leaveInnerStreamOpen: true,
userCertificateValidationCallback: (a, b, c, d) => true);
}