X509ContentType 枚举


指定 X.509 证书的格式。Specifies the format of an X.509 certificate.

public enum class X509ContentType
public enum X509ContentType
type X509ContentType = 
Public Enum X509ContentType


Authenticode 6

Authenticode X.509 证书。An Authenticode X.509 certificate.

Cert 1

单个 X.509 证书。A single X.509 certificate.

Pfx 3

PFX 格式的证书。A PFX-formatted certificate. Pfx 值与 Pkcs12 值相同。The Pfx value is identical to the Pkcs12 value.

Pkcs12 3

PKCS #12 格式的证书。A PKCS #12-formatted certificate. Pkcs12 值与 Pfx 值相同。The Pkcs12 value is identical to the Pfx value.

Pkcs7 5

PKCS #7 格式的证书。A PKCS #7-formatted certificate.

SerializedCert 2

单个序列化 X.509 证书。A single serialized X.509 certificate.

SerializedStore 4

序列化存储区。A serialized store.

Unknown 0

未知 X.509 证书。An unknown X.509 certificate.


内容类型 Cert、Pkcs12 和 SerializedCert 可以导出为字节数组。Content types Cert, Pkcs12, and SerializedCert can be exported as byte arrays. 因此, 所有这三种格式都是序列化证书。Therefore, all three formats are serialized certificates. SerializedCert 不同于导出的证书文件, 因为它是通过使用CertSerializeCertificateStoreElement 函数创建的, 该函数将编码的证书及其编码的属性序列化。SerializedCert differs from an exported Cert file in that it is created by using the CertSerializeCertificateStoreElement function, which serializes both the encoded certificate and its encoded properties. 如果以这两种X509Certificate格式导出相同的对象并查看生成的字节数组, 则会看到两个不同的对象。If you export the same X509Certificate object in both formats and view the resulting byte arrays, you will see that the two are different.