Removed redundant functions, some Standardisation work

This commit is contained in:
Deon George
2016-08-15 21:23:18 +10:00
parent 24bb4a701b
commit 07de13f678
82 changed files with 367 additions and 590 deletions

View File

@@ -47,14 +47,6 @@ class Model_Service_Plugin_Ssl extends Model_Service_Plugin {
return (! $this->_so) ? ($format ? 'Not Issued' : 0) : $this->_so->get_valid_to($format);
}
public function name($variable=NULL) {
return ($this->cert AND $this->ca->loaded()) ? sprintf('%s:%s',$this->ca->subject(),$this->display('cert')) : $this->display('csr');
}
public function namesub($variable=NULL) {
return $this->ca->dn();
}
public function password() {} // Not used
public function username() {} // Not used
@@ -156,6 +148,14 @@ class Model_Service_Plugin_Ssl extends Model_Service_Plugin {
return 'Unknown';
}
public function name($variable=NULL) {
return ($this->cert AND $this->ca->loaded()) ? sprintf('%s:%s',$this->ca->subject(),$this->display('cert')) : $this->display('csr');
}
public function namesub($variable=NULL) {
return $this->ca->dn();
}
/**
* Renew an SSL Certificate
*/
@@ -180,7 +180,7 @@ class Model_Service_Plugin_Ssl extends Model_Service_Plugin {
$res = openssl_csr_sign($this->csr,$this->ca->sign_cert,$this->ca->sign_pk,$days,array(
'config'=>$ssl_conf['config'],
'x509_extensions'=>$this->service->product->plugin()->extensions,
'digest_alg'=>'sha1',
'digest_alg'=>$ssl_conf['digest'],
),time());
if ($res AND openssl_x509_export($res,$cert)) {