According to Microsoft Updates Its TLS 1.3 Support Plans in Windows, Office 365 and .NET and Announcing .NET 5.0 RC 1 , does .NET 5.0 RC 1 already support tls1.3? If not, will it definitely be supported in November? In addition, where can I see the official .net schedule.
My test code:
using System;
using System.IO;
using System.Net.Security;
using System.Security.Authentication;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
namespace TestTls13{
class Program {
static void Main(string[] args) {
RemoteCertificateValidationCallback certificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => {
return (true);
};
using(MemoryStream msClient = new MemoryStream()) {
using(MemoryStream msServer = new MemoryStream()) {
using(SslStream sslStreamClient = new SslStream(msClient, false, certificateValidationCallback)) {
using(SslStream sslStreamServer = new SslStream(msServer, false, certificateValidationCallback)) {
Task taskClient = Task.Run(() => {
sslStreamClient.AuthenticateAsClient("nord-IT-systeme GmbH", new X509CertificateCollection() { CreateCert(), }, SslProtocols.Tls13, false);
});
Task taskServer = Task.Run(() => {
sslStreamServer.AuthenticateAsServer(CreateCert(), false, SslProtocols.Tls13, false);
});
Task.WaitAll(taskClient, taskServer);
}
}
}
}
}
static X509Certificate2 CreateCert() {
ECDsa ecdsa = ECDsa.Create();
CertificateRequest req = new CertificateRequest("CN=nord-IT-systeme GmbH", ecdsa, HashAlgorithmName.SHA256);
X509Certificate2 cert = req.CreateSelfSigned(DateTimeOffset.Now, DateTimeOffset.Now.AddYears(5));
return (cert);
}
}
}
Is this exception because it does not support tls1.3 yet?
TLS informations in my PC