From bf46209cefa5d09041865e52f9f78721b10e7dd0 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 14 Dec 2012 12:53:39 +0100 Subject: adopt certs to changes in the leap ca --- certs/app/controllers/certs_controller.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'certs/app/controllers/certs_controller.rb') diff --git a/certs/app/controllers/certs_controller.rb b/certs/app/controllers/certs_controller.rb index 402bef3..d81aea0 100644 --- a/certs/app/controllers/certs_controller.rb +++ b/certs/app/controllers/certs_controller.rb @@ -4,8 +4,11 @@ class CertsController < ApplicationController # GET /cert def show - @cert = Cert.pick_from_pool - render :text => @cert.zipped, :content_type => 'text/plain' + @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 -- cgit v1.2.3