IX509Enrollment::Certificate property

The Certificate property retrieves the installed certificate. The certificate is contained in a byte array that is encoded by using Distinguished Encoding Rules (DER) as defined by the Abstract Syntax Notation One (ASN.1) standard. The DER-encoded byte array is represented by a string that is either a pure binary sequence or Unicode encoded.

This property is read-only.

Syntax


HRESULT get_Certificate(
  [in]  EncodingType Encoding,
  [out] BSTR         *pValue
);

Property value

Pointer to a BSTR variable that contains the certificate.

Error codes

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Name/valueMeaning
CERTSRV_E_PROPERTY_EMPTY

The certificate cannot be found.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

CertEnroll.h

DLL

CertEnroll.dll

See also

IX509Enrollment

 

 

Community Additions

ADD
Show: