What is the difference between the two?
+3
A:
The x509Certificate was introduced in .NET v1.0/1.1 and was (comparatively) limited in its functionality. It can be used to get information about an existing certificate (valid dates, issuer, etc.). It had simple methods/operations (i.e. reading a cert from disk).
The x509Certificate2 is a superclass of the x509Certificate.
- It represents an actual X509 certificate.
- It was new in the .NET Framework v2.0.
- This class gives you access to all the V2 and V3 properties (authority key identifier and key usage).
- It supports loading a certificate from a certificate store.
p.campbell
2009-07-25 17:54:54