The GetCertificate method returns the certificate issued for the request, packaged in a PKCS#7 message, including the complete certificate chain for the certificate server.
[VB] BSTR GetCertificate( long Flags ); [JAVA] java.lang.String GetCertificate( int Flags ); [C++] HRESULT GetCertificate( LONG Flags, // in BSTR * pstrCertificate // out, return value );
|Certificate Format Flag||Description|
|CR_OUT_BASE64HEADER||BASE64 format with begin/end.|
|CR_OUT_BASE64||BASE64 format without begin/end.|
The following flag can be used to specify that the complete certificate chain should be included with the requested certificate. Otherwise, just the requested certificate is returned.
|CR_OUT_CHAIN||Include complete certificate chain.|
For example, to retrieve a binary certificate with complete certificate chain, in C++ you would write:
hResult = GetCertificate(CR_OUT_BINARY | CR_OUT_CHAIN, &pstrCert);
Returns the requested certificate.