X509ContentType X509ContentType X509ContentType X509ContentType Enum


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

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


Authenticode Authenticode Authenticode Authenticode 6

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

Cert Cert Cert Cert 1

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

Pfx Pfx Pfx Pfx 3

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

Pkcs12 Pkcs12 Pkcs12 Pkcs12 3

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

Pkcs7 Pkcs7 Pkcs7 Pkcs7 5

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

SerializedCert SerializedCert SerializedCert SerializedCert 2

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

SerializedStore SerializedStore SerializedStore SerializedStore 4

序列化存储区。A serialized store.

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