This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
tsmac/application/classes/Model/SSL.php

26 lines
589 B
PHP
Raw Permalink Normal View History

2014-10-09 12:23:02 +00:00
<?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)));
}
}
?>