Sample code for 30+ languages & platforms
Node.js

Transition from Cert.GetCertChain to Cert.BuildCertChain

Provides instructions for replacing deprecated GetCertChain method calls with BuildCertChain.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var cert = new chilkat.Cert();

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

    // certchainObj: CertChain
    var certchainObj = cert.GetCertChain();
    if (cert.LastMethodSuccess == false) {
        console.log(cert.LastErrorText);
        return;
    }

    //  ...
    //  ...

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

    var certchainOut = new chilkat.CertChain();
    success = cert.BuildCertChain(certchainOut);
    if (success == false) {
        console.log(cert.LastErrorText);
        return;
    }


}

chilkatExample();