26 lines
589 B
PHP
26 lines
589 B
PHP
<?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)));
|
|
}
|
|
}
|
|
?>
|