Import Certificate Error - WeOnlyDo Discussion board

Import Certificate Error (wodWebServer / wodWebServer.NET)

by Danny, Thursday, December 22, 2022, 08:05 (491 days ago) @ Jasmine

Thanks Jasmine
it works.

Danny

Hi Danny.

I just tried, for a test, with a certificate from selfsigned.org, works like a charm. I had following code and it works correctly with our SSL sample:


System.Security.Cryptography.X509Certificates.X509Certificate2 cert = new System.Security.Cryptography.X509Certificates.X509Certificate2();

cert.Import(AppPath() + "\\localhost.com.pfx", "password", System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.Exportable);

web1.Certificate = cert;
web1.Secure = true;
web1.SecureMethod = System.Security.Authentication.SslProtocols.Tls13;
web1.Start();

Complete thread: