ICertAdmin2::GetArchivedKey method (certadm.h)
HRESULT GetArchivedKey( [in] const BSTR strConfig, [in] LONG RequestId, [in] LONG Flags, [out] BSTR *pstrArchivedKey );
Represents a valid configuration string for the certification authority (CA) in the form ComputerName\CAName, where ComputerName is the Certificate Services server's network name, and CAName is the common name of the CA, as entered during Certificate Services setup. For information about the configuration string name, see ICertConfig.
Represents the certificate request ID in the Certificates Services database.
The following flags can be used to specify the format of the returned BLOB.
||BASE64 without BEGIN/END|
||BASE64 with BEGIN CERTIFICATE and END CERTIFICATE|
A pointer to the string that represents the retrieved archived key BLOB. When you have finished using this string, it is the responsibility of the caller to free it by calling the SysFreeString function.
C++The return value is an HRESULT. A value of S_OK indicates the method was successful.
VBA string that contains the retrieved archived key BLOB.
An archived key is encrypted in a PKCS #7 to the key recovery agent certificate or certificates, and is stored in the Certificate Services database in that form. This method retrieves the encrypted PKCS #7 from the Certificate Services database, wraps it in a signed PKCS #7 which contains the user certificate and chain, the key recovery agent certificate or certificates, and the certification authority's signing certificate and chain. An authenticated attribute contains a certificate used to uniquely identify the user certificate.
|Minimum supported client||None supported|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||certadm.h (include Certsrv.h)|