(AutoIt) Example: Crypt2.SetSigningCert method
Demonstrates how to call the SetSigningCert method.
; Signing certificates can be obtained from many different sources..
; Load from a PFX
$oCryptA = ObjCreate("Chilkat.Crypt2")
$oCertA = ObjCreate("Chilkat.Cert")
Local $bSuccess = $oCertA.LoadPfxFile("c:/someDir/pfx_files/a.pfx","pfx_file_password")
$bSuccess = $oCryptA.SetSigningCert($oCertA)
; ...
; Load from a smart card or USB token.
$oCryptB = ObjCreate("Chilkat.Crypt2")
$oCertB = ObjCreate("Chilkat.Cert")
$oCertB.SmartCardPin = "123456"
$bSuccess = $oCertB.LoadFromSmartcard("")
$bSuccess = $oCryptB.SetSigningCert($oCertB)
; ...
; Load from a the Windows certificate store or macOS keychain
$oCryptC = ObjCreate("Chilkat.Crypt2")
$oCertC = ObjCreate("Chilkat.Cert")
$bSuccess = $oCertC.LoadByCommonName("Xyz 123")
$bSuccess = $oCryptC.SetSigningCert($oCertC)
; ...
|