summaryrefslogtreecommitdiff
path: root/certs/app/controllers
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-12-14 12:53:39 +0100
committerAzul <azul@leap.se>2012-12-14 12:53:39 +0100
commit842845abffda2cf9abe38bac48d5c4b7cf3714b5 (patch)
treefbfae369836f8173643456f555636e9a6e64fa59 /certs/app/controllers
parentc9f3ddc9c1e4660ac86ec6ab33c927753a2f59bc (diff)
adopt certs to changes in the leap ca
Diffstat (limited to 'certs/app/controllers')
-rw-r--r--certs/app/controllers/certs_controller.rb7
1 files changed, 5 insertions, 2 deletions
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