Sample code for 30+ languages & platforms
AutoIt

Example: Crypt2.ClearSigningCerts method

Demonstrates how to call the ClearSigningCerts method.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oCrypt = ObjCreate("Chilkat.Crypt2")
$bSuccess = False

;  Tell the crypt object to use 3 certificates.
;  Do this by calling AddSigningCert for each certificate.

$oCert1 = ObjCreate("Chilkat.Cert")
;  ...
;  Load the cert from a source such as a .pfx/.p12 file, smart card, USB token, Apple keychain, Windows certificate store, etc.
;  ...
$oCrypt.AddSigningCert($oCert1)

$oCert2 = ObjCreate("Chilkat.Cert")
;  ...
$oCrypt.AddSigningCert($oCert2)

$oCert3 = ObjCreate("Chilkat.Cert")
;  ...
$oCrypt.AddSigningCert($oCert3)

$oBd = ObjCreate("Chilkat.BinData")
;  ...

$bSuccess = $oCrypt.OpaqueSignBd($oBd)

;  Let's say we now want to sign something else with different certs..
;  First clear the signing certs.
$oCrypt.ClearSigningCerts 

$oCert4 = ObjCreate("Chilkat.Cert")
;  ...
$oCrypt.AddSigningCert($oCert4)

$oCert5 = ObjCreate("Chilkat.Cert")
;  ...
$oCrypt.AddSigningCert($oCert5)

;  ...
;  ...

;  Sign using cert4 and cert5.
$bSuccess = $oCrypt.OpaqueSignBd($oBd)