statianzo/Fleck — Issue #24: Provide a way to set certificate through standard Windows means
Author: ChristianWeyer
Created: 2011-11-17 14:11:54+00:00
State: open

There should be a way to set the certificate through the Windows certificate store API.

Something like this:

X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection certificates = store.Certificates.Find(
X509FindType.FindByThumbprint, thumbprint, true);

server.Certificate = certificates[0];