Decode recently created cert and key. It fixes #3964. While here, fix logical condition to create a new cert if crt or key is not present
This commit is contained in:
parent
4721677dd7
commit
44c7d73c4a
|
@ -826,10 +826,10 @@ function system_webgui_start() {
|
|||
if ($config['system']['webgui']['protocol'] == "https") {
|
||||
// Ensure that we have a webConfigurator CERT
|
||||
$cert =& lookup_cert($config['system']['webgui']['ssl-certref']);
|
||||
if(!is_array($cert) && !$cert['crt'] && !$cert['prv']) {
|
||||
if(!is_array($cert) || !$cert['crt'] || !$cert['prv']) {
|
||||
$cert = system_webgui_create_certificate();
|
||||
$crt = $cert['crt'];
|
||||
$key = $cert['prv'];
|
||||
$crt = base64_decode($cert['crt']);
|
||||
$key = base64_decode($cert['prv']);
|
||||
} else {
|
||||
$crt = base64_decode($cert['crt']);
|
||||
$key = base64_decode($cert['prv']);
|
||||
|
|
Reference in New Issue