Platform SDK: Certificate Enrollment Control

ICEnroll::DeleteRequestCert [C++]

CEnroll.DeleteRequestCert [Visual Basic]

The DeleteRequestCert property is used to control whether deletion occurs on a dummy certificate created for the purpose of persisting the keys generated for the PKCS #10 request during the enrollment process.

The store specified by the RequestStoreName property is where the dummy certificate is created. The newly generated keys are added as properties to the dummy certificate to persist them until a certification authority processes the request and responds with a PKCS #7. On acceptance of the PKCS #7, the dummy certificate is removed and the keys are added as properties of the issued certificate returned by the certification authority. For debugging and testing, it is often desirable to not delete the dummy certificate. Setting DeleteRequestCert to FALSE prevents its deletion. By default, this value is set to TRUE.

[Visual Basic]
objEnroll.DeleteRequestCert [ = bValue ]
[C++]
HRESULT put_DeleteRequestCert(BOOL bValue);
HRESULT get_DeleteRequestCert(BOOL * pbValue);

Parameters

[Visual Basic] objEnroll
Object expression that resolves to a CEnroll object.
[Visual Basic,C++] bValue
A boolean value assigned to the DeleteRequestCert property. It is one of the following values:
[C++] pbValue
Pointer to retrieved property value.

Remarks

DeleteRequestCert affects the behavior of the following methods:

Example Code [C++]

BOOL     bDRC;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

// get the DeleteRequestCert boolean value
hr = pEnroll->get_DeleteRequestCert( &bDRC );
if ( FAILED ( hr ) )
    printf("Failed getting DeleteRequestCert - %x\n", hr );
else
    printf( "DeleteRequestCert: %s\n", ( bDRC ? "TRUE" : "FALSE" ) );

// set the DeleteRequestCert value
hr = pEnroll->put_DeleteRequestCert( FALSE );
if ( FAILED ( hr ) )
    printf("Failed Setting DeleteRequestCert - %x\n", hr );
else
    printf( "DeleteRequestCert was set to FALSE\n" ); 

Example Code [Visual Basic]

' declare Certificate Enrollment Control object
Dim objXen As Object

Dim bDelReqCert As Boolean

' instantiate the object
Set objXen = CreateObject("CEnroll.CEnroll.1")

' retrieve and display the DeleteRequestCert value
bDelReqCert = objXen.DeleteRequestCert
MsgBox bDelReqCert, vbOKOnly, "DeleteRequestCert"

' set the DeleteRequestCert value
objXen.DeleteRequestCert = False

Requirements

  Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with the Windows NT 4.0 Option Pack).
  Header: Declared in Xenroll.h.
  Library: Use Uuid.lib.