     return
 
   certData = this.request.body
+  certData['dateRevoked'] = new Date()
 
   try
     cert_entry = new RevokedCert certData
     result = yield Q.ninvoke cert_entry, 'save'
-    
+
     logger.info "User #{this.authenticated.email} added a new entry in the revocation list with for cert with serial: #{result["serial"]};issuer: #{result["issuerDN"]}"
     this.body = 'Successfully added in the Revocation list'
     this.status = 201

  try
    this.body = yield RevokedCert.find().exec()
    #this.body = revokedcertDoc
    
  catch err
    utils.logAndSetResponse this, 500, "Could not fetch the list of revoked certificates: #{err}", 'error'



  Keystore.findOne (err, keystoreDoc) ->
    return callback err, null if err

    # if the key is encrypted but no passphrase is supplied, return  false instantly
    if /Proc-Type:.*ENCRYPTED/.test(keystoreDoc.key) and (not keystoreDoc.passphrase? or keystoreDoc.passphrase.length == 0)
      return callback null, false
