The GetCACertificate method returns the root certificate for the certificate server.
[VB] BSTR GetCACertificate(
long fExchangeCertificate,
BSTR strConfig,
long Flags
);
[JAVA] java.lang.String GetCACertificate(
int fExchangeCertificate,
java.lang.String strConfig,
int Flags
);
[C++] HRESULT GetCACertificate(
LONG fExchangeCertificate, // in
BSTR const strConfig, // in
LONG Flags, // in
BSTR *strCertificate // out, return value
);
Certificate Format Flag | Description |
---|---|
CR_OUT_BASE64HEADER | BASE64 format with begin/end. |
CR_OUT_BASE64 | BASE64 format without begin/end. |
CR_OUT_BINARY | Binary format. |
The following flag can be used to specify that the complete certificate chain should be included with the requested CA certificate. Otherwise, just the requested CA certificate is returned.
Certificate Flag | Description |
---|---|
CR_OUT_CHAIN | Include complete certificate chain. |
For example, to retrieve a binary CA certificate with complete certificate chain, in C++ you would write:
hResult = GetCACertificate(CR_OUT_BINARY | CR_OUT_CHAIN, &pstrCert);
Returns the root certificate for the certificate server, in the specified format.
Windows NT: Requires version 5.0 or later (or version 4.0 with the Windows NT 4.0 Option Pack).
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in certcli.h.
Import Library: Use certidl.lib.