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 subclass of x509Certificate with additional functionality.
- 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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…