Updates to SSL and other general items
This commit is contained in:
27
modules/ssl/classes/Controller/Ssl.php
Normal file
27
modules/ssl/classes/Controller/Ssl.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides SSL management
|
||||
*
|
||||
* @package SSL
|
||||
* @category Controllers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2014 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
class Controller_Ssl extends Controller_TemplateDefault {
|
||||
protected $auth_required = FALSE;
|
||||
|
||||
public function action_download() {
|
||||
$so = ORM::factory('SSL_CA')->where('id','=',$this->request->param('id'))->or_where('name','=',$this->request->param('id'))->find();
|
||||
|
||||
if (! $so->loaded() OR ! $so->cert)
|
||||
throw HTTP_Exception::factory(404,'SSL either doesnt exist');
|
||||
|
||||
$this->auto_render = FALSE;
|
||||
$this->response->headers('Content-Type','plain/text');
|
||||
$this->response->headers('Content-Disposition','attachment; filename="'.$so->name.'.crt"');
|
||||
$this->response->body($so->cert);
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user