BrowserDeleteCertificate Function

Action

Deletes the client certificate from the operating system's certificate store. This function is similar to manually deleting a certificate.

The certificate APIs work with Microsoft Windows 7 or later, Microsoft Windows Server 2008 R2 or later, and Internet Explorer 8 or later.

Note: This function only works with Internet Explorer.

Include file

BrowserAPI.bdh

Syntax

BrowserDeleteCertificate( sCertificatename : in string, 
                          sCertstore       : in string optional ): boolean;
Parameter Description
sCertificatename The certificate to be deleted.
sCertstore Optional: The certificate store name. When this parameter is not specified certificates are deleted from the My store, available on the certificate tab's Personal tab.

Return Value

  • true if successful

  • false otherwise

Example

Note: The following example does not work out-of-the-box, as you first need to set up a certificate in order to execute actions on it.
benchmark SilkPerformerRecorder

use "Kernel.bdh"
use "BrowserAPI.bdh"

dcluser
  user
    VUser
  transactions
    TInit           : begin;
    TMain           : 1;

var

dclrand

dcltrans
  transaction TInit
  begin
  end TInit;

  transaction TMain
  begin
    BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
    
    // delete the certificate from the default certificate store
    BrowserDeleteCertificate("John Smith");
  end TMain;