Question

Where can I find information on opening a PFX store which contains a certificate? I came across this, however I am kind of loast at the PfxOpen Class.

Edit - I have a pfx file exported with a private key. I am storing that in my database. I want to be able to open the pfx file and read information from the certificate contained in that pfx file, example the serial, expiration date etc.

Was it helpful?

Solution

X509Certificate2 cert = new X509Certificate2(filename, password)

from there you can see what's in the cert. the X509Certificate2 has many overloads. check it out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top