ICertServerExit::GetRequestProperty method (certif.h)
The GetRequestProperty method returns a named property from a request.
Note that the request is used to hold all associated states for the request and the eventual granted certificate that is not a part of the certificate. Thus, data such as revocation times and disposition data are kept in the request data object.
Syntax
HRESULT GetRequestProperty(
[in] const BSTR strPropertyName,
[in] LONG PropertyType,
[out] VARIANT *pvarPropertyValue
);
Parameters
[in] strPropertyName
Specifies the property to retrieve. There is a stock set of certificate properties, referred to as the name properties, that are always valid and can be retrieved by calling this method. For information about these properties, see Name Properties.
Other properties valid for certificate requests include the request properties.
The following properties are unique to requests and can be accessed by using the GetRequestProperty method.
Request property | Meaning |
---|---|
|
Current request disposition |
|
Informational disposition message |
|
Certificate for the issuing certification authority |
|
Raw request bytes |
|
Attribute string (can be truncated) |
|
The name of the requester in the form "DomainName\UserID" |
|
Internal requestID |
|
Indicates PKCS #10 or KeyGen request |
|
When resolved |
|
Windows error for last operation |
|
When arrived |
The RequestType property will be one of the following values.
Value | Meaning |
---|---|
|
PKCS #7 renewal or registration request |
|
PKCS #10 request |
|
Keygen request (Netscape format) |
In addition, other properties may be set by a specific request type, request extensions, or by named attributes set in the header of a request.
[in] PropertyType
Specifies the property type. The type can be one of the following types.
Value | Meaning |
---|---|
|
Signed long data |
|
Date/time |
|
Binary data |
|
Unicode string data |
[out] pvarPropertyValue
A pointer to the VARIANT that will contain the request property type.
Return value
C++
If the method succeeds, the method returns S_OK, and *pvarPropertyValue is set to the VARIANT that contains the request property value.If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.
VB
The return value is the request property value.Remarks
You must call ICertServerExit::SetContext prior to using this method.
Examples
BSTR bstrPropName = NULL;
VARIANT varProp;
VariantInit( &varProp );
bstrPropName = SysAllocString(L"RequestID");
// Retrieve the request property.
// pCertServerExit has been used to call SetContext previously.
hr = pCertServerExit->GetRequestProperty( bstrPropName,
PROPTYPE_LONG,
&varProp );
if (FAILED(hr))
{
printf("Failed GetRequestProperty [%x]\n", hr);
goto error;
}
else
{
// Successfully retrieved property; use varProp as needed.
// ...
}
// Done processing.
VariantClear( &varProp );
if ( NULL != bstrPropName )
SysFreeString( bstrPropName );
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | certif.h (include Certsrv.h) |
Library | Certidl.lib |
DLL | Certcli.dll |