docs: function verifyChain(certificate, chain, trustedCAs) {
    if (certificate === null) return Promise.resolve(false);
  
    return Promise.resolve().then(function () {
      var certificateChainEngine = new pkijs.CertificateChainValidationEngine({
        certs: chain,
        trustedCerts: trustedCAs.filter(function (cert) {
          return typeof cert !== 'undefined';
        })
      });
      certificateChainEngine.certs.push(certificate);
  
      return certificateChainEngine.verify();
    }).then(function (result) {
      return result.result;
    }, function (result) {
      return false;
    });
  }