Removed redundant functions, some Standardisation work
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user