在.NET X509Certificate2和X509证书之间的区别是什么?证书、区别、NET

2023-09-03 04:41:14 作者:命不低头

这两者之间的区别是什么?

What is the difference between the two?

推荐答案

的x509Certificate中引入了.NET 1.0 / 1.1,是(相对)限制其功能。 它可以用来获取有关现有证书(有效日期,发行人等)的信息。它有简单的方法/操作(如从磁盘读取一个证书)。

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).

的x509Certificate2是x509证书的一个子类的附加功能。

The x509Certificate2 is a subclass of x509Certificate with additional functionality.

在它重新presents实际的X509证书。 这是新在.NET Framework 2.0版。 在这个类,您可以访问所有的V2和V3性能(授权密钥识别和密钥使用)。 支持加载从证书存储的证书。