 clientLookup = (fingerprint, subjectCN, issuerCN) ->
   logger.debug "Looking up client linked to cert with fingerprint #{fingerprint} with subject #{subjectCN} and issuer #{issuerCN}"
   deferred = Q.defer()
-  
+  promises = []
+
   Client.findOne certFingerprint: fingerprint, (err, result) ->
     deferred.reject err if err
 


      ## MyEdit - May 24
      ## Since we have found a cert-client match, (CA chaining or not)
      ## we can heck here for revocation list match. 
      ## 
      revoked = false
      RevokedCert.findOne {certFingerprint: fingerprint, issuerDN: issuerCN}, (err,result) ->
        if err
          return deferred.reject err
        if not result?
          logger.info "Certificate for cn=#{subjectCN} issuerCN=#{issuerCN} is in revocation list."
          revoked = true
      ######
      if revoked?
        return deferred.resolve null
      return deferred.resolve result

    if subjectCN is issuerCN
      # top certificate reached


    else
      return done(new Error 'Keystore does not exist')

    if mutualTLS
      exports.getTrustedClientCerts (err, certs) ->
        if err
