Updates to SSL and other general items

This commit is contained in:
Deon George
2014-10-09 23:23:02 +11:00
parent c952738750
commit 8d71460121
25 changed files with 813 additions and 391 deletions

View File

@@ -0,0 +1,25 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* SSL Model
*
* @package TSM Access Management
* @category Models
* @author Deon George
* @copyright (c) 2014 Deon George
* @license http://dev.leenooks.net/license.html
*/
class Model_SSL extends lnApp_Model_SSL {
public function rules() {
return Arr::merge(parent::rules(),array(
'csr'=>array(
array(array($this,'isValidDN')),
),
));
}
public function isValidDN() {
return ! $this->isCA() AND ($this->account->ssl_dn() == self::_dn(openssl_csr_get_subject($this->csr)));
}
}
?>