Import Certificate Error - WeOnlyDo Discussion board

Import Certificate Error (wodWebServer / wodWebServer.NET)

by Danny, Tuesday, December 20, 2022, 17:17 (486 days ago)
edited by Danny, Tuesday, December 20, 2022, 17:22

Hi there

SSL server example works fine with the provided certificate:

cert.Import(AppPath() + "\\certificate.pfx", "weonlydo", System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.Exportable);
web1.Certificate = cert;

any other certificate (self signed o standard) fails importing Private key with a inner exception 'System.Security.Cryptography.CryptographicException',
so cert.PrivateKey is null and the server won't start.

I tried with using powershell cmdlet, import export from computer certificate store, CreateCertificate API c#, but without luck.

How did you generate the sample certificate?


Complete thread: