   catch e
     logger.error "Could not remove entry in revocation list by ID # via the API: #{e.message}"
     this.body = e.message
-    this.status = 500+    this.status = 500



exports.removeRevokedCert = () ->
#must accept {serial,issuer} 
  # Test if the user is authorised
  if not authorisation.inGroup 'admin', this.authenticated
    utils.logAndSetResponse this, 403, "User #{this.authenticated.email} is not an admin, API access to removeRevokedCert.", 'info'


  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
