Updates to SSL and other general items
This commit is contained in:
25
application/classes/Model/SSL.php
Normal file
25
application/classes/Model/SSL.php
Normal 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)));
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user