Fixes from live website

This commit is contained in:
Deon George
2013-04-20 11:40:44 +10:00
parent 13982be9f6
commit 79c76995b9
22 changed files with 283 additions and 55 deletions

View File

@@ -132,13 +132,13 @@ class Model_Service_Plugin_Ssl extends Model_Service_Plugin {
}
public function renew() {
$d = SSL::details($this->cert);
$d = SSL::instance($this->cert);
$ssl_conf = Kohana::$config->load('ssl');
// @todo change this so an admin can force this.
$force = TRUE;
// If our certificate is not old enough skip
if ($d['validTo_time_t'] > time()+$ssl_conf['min_renew_days']*86400 AND ! $force)
if ($d->get_valid_to() > time()+$ssl_conf['min_renew_days']*86400 AND ! $force)
return FALSE;
$res = openssl_csr_sign($this->csr,$this->SSL_CA->sign_cert,$this->SSL_CA->sign_pk,$this->service->product->plugin()->days,array(