diff options
author | azul <azul@riseup.net> | 2012-12-17 17:03:20 -0800 |
---|---|---|
committer | azul <azul@riseup.net> | 2012-12-17 17:03:20 -0800 |
commit | d37fe6ada458b80019d16803fc73e5c406dc515f (patch) | |
tree | 7f8da22a5437e193c6becd95869f543291461083 /certs/app/controllers | |
parent | 7528695461f2c5725fe29787aa6bf703050a1a4a (diff) | |
parent | a8f5a1ec486d5ee378f7b820c9f2c046e5c03672 (diff) |
Merge pull request #3 from leapcode/feature/certs-from-ca-deamon
Adopt certs to changes in the leap ca
Diffstat (limited to 'certs/app/controllers')
-rw-r--r-- | certs/app/controllers/certs_controller.rb | 7 |
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 |