DataFlex
DataFlex
Transition from Cert.GetCertChain to Cert.BuildCertChain
Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoCert
Variant vCertchainObj
Handle hoCertchainObj
Variant vCertchainOut
Handle hoCertchainOut
String sTemp1
Boolean bTemp1
Move False To iSuccess
Get Create (RefClass(cComChilkatCert)) To hoCert
If (Not(IsComObjectCreated(hoCert))) Begin
Send CreateComObject of hoCert
End
// ------------------------------------------------------------------------
// The GetCertChain method is deprecated:
Get ComGetCertChain Of hoCert To vCertchainObj
If (IsComObject(vCertchainObj)) Begin
Get Create (RefClass(cComChilkatCertChain)) To hoCertchainObj
Set pvComObject Of hoCertchainObj To vCertchainObj
End
Get ComLastMethodSuccess Of hoCert To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoCert To sTemp1
Showln sTemp1
Procedure_Return
End
// ...
// ...
Send Destroy of hoCertchainObj
// ------------------------------------------------------------------------
// Do the equivalent using BuildCertChain.
// Your application creates a new, empty CertChain object which is passed
// in the last argument and filled upon success.
Get Create (RefClass(cComChilkatCertChain)) To hoCertchainOut
If (Not(IsComObjectCreated(hoCertchainOut))) Begin
Send CreateComObject of hoCertchainOut
End
Get pvComObject of hoCertchainOut to vCertchainOut
Get ComBuildCertChain Of hoCert vCertchainOut To iSuccess
If (iSuccess = False) Begin
Get ComLastErrorText Of hoCert To sTemp1
Showln sTemp1
Procedure_Return
End
End_Procedure