|
@ -448,8 +448,8 @@ class Certificate { |
|
|
|
|
|
|
|
|
public static function saveCert($host, $certInfo) { |
|
|
public static function saveCert($host, $certInfo) { |
|
|
$info = Storage::getInfo($host); |
|
|
$info = Storage::getInfo($host); |
|
|
$cert = $certInfo['cert_code']; |
|
|
$cert = trim($certInfo['cert_code']); |
|
|
$caCert = $certInfo['ca_code']; |
|
|
$caCert = trim($certInfo['ca_code']); |
|
|
$startTime = $certInfo['created_at']; |
|
|
$startTime = $certInfo['created_at']; |
|
|
$endTime = $certInfo['expire_at']; |
|
|
$endTime = $certInfo['expire_at']; |
|
|
$info['status'] = 'issued'; |
|
|
$info['status'] = 'issued'; |
|
@ -879,7 +879,7 @@ class InstallCtr { |
|
|
if (isset($info[$field]) && $info[$field] !== '') { |
|
|
if (isset($info[$field]) && $info[$field] !== '') { |
|
|
switch ($field) { |
|
|
switch ($field) { |
|
|
case 'fullchain': |
|
|
case 'fullchain': |
|
|
$content = Storage::getCert($host) . Storage::getCaCert($host); |
|
|
$content = Storage::getCert($host) . PHP_EOL . Storage::getCaCert($host); |
|
|
break; |
|
|
break; |
|
|
case 'key': |
|
|
case 'key': |
|
|
$content = Storage::getPrivkey($host); |
|
|
$content = Storage::getPrivkey($host); |
|
|