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.