![]() |
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.SetSigningCert methodDemonstrates how to call the SetSigningCert method.
integer li_rc oleobject loo_CryptA oleobject loo_CertA integer li_Success oleobject loo_CryptB oleobject loo_CertB oleobject loo_CryptC oleobject loo_CertC // Signing certificates can be obtained from many different sources.. // Load from a PFX loo_CryptA = create oleobject li_rc = loo_CryptA.ConnectToNewObject("Chilkat.Crypt2") if li_rc < 0 then destroy loo_CryptA MessageBox("Error","Connecting to COM object failed") return end if loo_CertA = create oleobject li_rc = loo_CertA.ConnectToNewObject("Chilkat.Cert") li_Success = loo_CertA.LoadPfxFile("c:/someDir/pfx_files/a.pfx","pfx_file_password") li_Success = loo_CryptA.SetSigningCert(loo_CertA) // ... // Load from a smart card or USB token. loo_CryptB = create oleobject li_rc = loo_CryptB.ConnectToNewObject("Chilkat.Crypt2") loo_CertB = create oleobject li_rc = loo_CertB.ConnectToNewObject("Chilkat.Cert") loo_CertB.SmartCardPin = "123456" li_Success = loo_CertB.LoadFromSmartcard("") li_Success = loo_CryptB.SetSigningCert(loo_CertB) // ... // Load from a the Windows certificate store or macOS keychain loo_CryptC = create oleobject li_rc = loo_CryptC.ConnectToNewObject("Chilkat.Crypt2") loo_CertC = create oleobject li_rc = loo_CertC.ConnectToNewObject("Chilkat.Cert") li_Success = loo_CertC.LoadByCommonName("Xyz 123") li_Success = loo_CryptC.SetSigningCert(loo_CertC) // ... destroy loo_CryptA destroy loo_CertA destroy loo_CryptB destroy loo_CertB destroy loo_CryptC destroy loo_CertC |
||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.