Sample code for 30+ languages & platforms
Xbase++ Requires Chilkat v11.0.0+

Transition from Cert.GetCertChain to Cert.BuildCertChain

Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain.

Chilkat Xbase++ Downloads

Xbase++
LOCAL nSuccess
LOCAL oCert
LOCAL oCertchainObj
LOCAL oCertchainOut

nSuccess := 0

oCert := CreateObject("Chilkat.Cert")

//  ------------------------------------------------------------------------
//  The GetCertChain method is deprecated:

oCertchainObj := oCert:GetCertChain()
IF (oCert:LastMethodSuccess == 0)
    ? oCert:LastErrorText
    oCert:destroy()
    RETURN
ENDIF

//  ...
//  ...

oCertchainObj:destroy()

//  ------------------------------------------------------------------------
//  Do the equivalent using BuildCertChain.
//  Your application creates a new, empty CertChain object which is passed 
//  in the last argument and filled upon success.

oCertchainOut := CreateObject("Chilkat.CertChain")
nSuccess := oCert:BuildCertChain(oCertchainOut)
IF (nSuccess == 0)
    ? oCert:LastErrorText
    oCert:destroy()
    oCertchainOut:destroy()
    RETURN
ENDIF

oCert:destroy()
oCertchainOut:destroy()