summaryrefslogtreecommitdiff
path: root/certs/app/controllers/certs_controller.rb
blob: d81aea08872a5d21722f9cdf7c5d080f306d2e24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class CertsController < ApplicationController

  before_filter :authorize

  # GET /cert
  def show
    @cert = LeapCA::Cert.pick_from_pool
    render :text => @cert.key + @cert.cert, :content_type => 'text/plain'
  rescue RECORD_NOT_FOUND
    flash[:error] = t(:cert_pool_empty)
    redirect_to root_path
  end

end