   promises.push deferred.promise
   Q.denodeify pem.createCertificate options, (err, cert) ->
     if (err)
-      console.log err
+
       response =
         err : err
       deferred.resolve()

    certInfo = yield readCertificateInfo this.body.certificate
    certInfo.data = this.body.certificate
    keystoreDoc.cert = certInfo
    yield Q.ninvoke keystoreDoc, 'save'

    #Add the new certficate to the keystore
    this.status = 201
    logger.info 'Server certificate created'
  catch err
    utils.logAndSetResponse this, 'internal server error', "Could not create a client cert via the API: #{err}", 'error'


createCertificate = (options) ->

    logger.info 'Client certificate created'
  catch err
    utils.logAndSetResponse this, 'internal server error', "Could not create a client cert via the API: #{err}", 'error'
  this.body

generateServerCert = (options) ->
  keystoreDoc = yield Keystore.findOne().exec()
