![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(PowerBuilder) Example: Crypt2.ClearSigningCerts methodDemonstrates how to call the ClearSigningCerts method.
integer li_rc oleobject loo_Crypt integer li_Success oleobject loo_Cert1 oleobject loo_Cert2 oleobject loo_Cert3 oleobject loo_Bd oleobject loo_Cert4 oleobject loo_Cert5 loo_Crypt = create oleobject li_rc = loo_Crypt.ConnectToNewObject("Chilkat.Crypt2") if li_rc < 0 then destroy loo_Crypt MessageBox("Error","Connecting to COM object failed") return end if li_Success = 0 // Tell the crypt object to use 3 certificates. // Do this by calling AddSigningCert for each certificate. loo_Cert1 = create oleobject li_rc = loo_Cert1.ConnectToNewObject("Chilkat.Cert") // ... // Load the cert from a source such as a .pfx/.p12 file, smart card, USB token, Apple keychain, Windows certificate store, etc. // ... loo_Crypt.AddSigningCert(loo_Cert1) loo_Cert2 = create oleobject li_rc = loo_Cert2.ConnectToNewObject("Chilkat.Cert") // ... loo_Crypt.AddSigningCert(loo_Cert2) loo_Cert3 = create oleobject li_rc = loo_Cert3.ConnectToNewObject("Chilkat.Cert") // ... loo_Crypt.AddSigningCert(loo_Cert3) loo_Bd = create oleobject li_rc = loo_Bd.ConnectToNewObject("Chilkat.BinData") // ... li_Success = loo_Crypt.OpaqueSignBd(loo_Bd) // Let's say we now want to sign something else with different certs.. // First clear the signing certs. loo_Crypt.ClearSigningCerts() loo_Cert4 = create oleobject li_rc = loo_Cert4.ConnectToNewObject("Chilkat.Cert") // ... loo_Crypt.AddSigningCert(loo_Cert4) loo_Cert5 = create oleobject li_rc = loo_Cert5.ConnectToNewObject("Chilkat.Cert") // ... loo_Crypt.AddSigningCert(loo_Cert5) // ... // ... // Sign using cert4 and cert5. li_Success = loo_Crypt.OpaqueSignBd(loo_Bd) destroy loo_Crypt destroy loo_Cert1 destroy loo_Cert2 destroy loo_Cert3 destroy loo_Bd destroy loo_Cert4 destroy loo_Cert5 |
||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.