![]() |
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
(PureBasic) Transition from Email.GetSignedByCertChain to Email.LastSignerCertProvides instructions for replacing deprecated GetSignedByCertChain method calls with LastSignerCert. Note: This example requires Chilkat v11.0.0 or greater.
IncludeFile "CkCert.pb" IncludeFile "CkCertChain.pb" IncludeFile "CkEmail.pb" Procedure ChilkatExample() email.i = CkEmail::ckCreate() If email.i = 0 Debug "Failed to create object." ProcedureReturn EndIf ; ... ; ... ; ------------------------------------------------------------------------ ; The GetSignedByCertChain method is deprecated: certChainObj.i = CkEmail::ckGetSignedByCertChain(email) If CkEmail::ckLastMethodSuccess(email) = 0 Debug CkEmail::ckLastErrorText(email) CkEmail::ckDispose(email) ProcedureReturn EndIf ; ... ; ... CkCertChain::ckDispose(certChainObj) ; ------------------------------------------------------------------------ ; Do the equivalent using LastSignerCert to get the signing certificate, ; then build the cert chain from the signing certificate object. signerCert.i = CkCert::ckCreate() If signerCert.i = 0 Debug "Failed to create object." ProcedureReturn EndIf success.i = CkEmail::ckLastSignerCert(email,0,signerCert) If success = 0 Debug CkEmail::ckLastErrorText(email) CkEmail::ckDispose(email) CkCert::ckDispose(signerCert) ProcedureReturn EndIf ; Get the certificate chain from the signer certificate. certChain.i = CkCertChain::ckCreate() If certChain.i = 0 Debug "Failed to create object." ProcedureReturn EndIf success = CkCert::ckBuildCertChain(signerCert,certChain) If success = 0 Debug CkCert::ckLastErrorText(signerCert) CkEmail::ckDispose(email) CkCert::ckDispose(signerCert) CkCertChain::ckDispose(certChain) ProcedureReturn EndIf CkEmail::ckDispose(email) CkCert::ckDispose(signerCert) CkCertChain::ckDispose(certChain) ProcedureReturn EndProcedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.