I want to read .PFX certificate from Local Machine Store.
I use bellow code to read .CER file from store.
X509Store store = new X509Store(StoreName.Root, StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection certificateCollection = store.Certificates.Find(X509FindType.FindBySerialNumber, certificateSerialNo, true);
if (certificateCollection.Count == 1)
{
//Do something
}
So is their any way to read .PFX certificate from STORE ?
It is my mistake. You can read .PFX certicicate as the same way as .CER,
So the Keypoints are.