diff options
author | jim-p <jimp@pfsense.org> | 2011-01-14 12:20:16 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-01-14 12:20:16 -0500 |
commit | 546f30caee9165f253d9ed3d84e23f03e82626d8 (patch) | |
tree | 0fcec59936149b47e7e862263df90aa2282cafc6 | |
parent | 396cfe2ee573696436e2c310f4d2610c1610965a (diff) | |
download | pfsense-546f30caee9165f253d9ed3d84e23f03e82626d8.zip pfsense-546f30caee9165f253d9ed3d84e23f03e82626d8.tar.gz |
Better test for an empty CA to avoid writing out an empty CA file (some on the forum are seeing this.)
-rw-r--r-- | etc/inc/system.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index bdd8157..296c4f2 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -1070,7 +1070,7 @@ EOD; fwrite($fd, "\n"); fwrite($fd, $key); fclose($fd); - if($ca <> "") { + if(!(empty($ca) || (strlen(trim($ca)) == 0))) { $fd = fopen("{$g['varetc_path']}/{$ca_location}", "w"); if (!$fd) { printf("Error: cannot open ca.pem in system_webgui_start().\n"); @@ -1084,7 +1084,7 @@ EOD; $lighty_config .= "## ssl configuration\n"; $lighty_config .= "ssl.engine = \"enable\"\n"; $lighty_config .= "ssl.pemfile = \"{$g['varetc_path']}/{$cert_location}\"\n\n"; - if($ca <> "") + if(!(empty($ca) || (strlen(trim($ca)) == 0))) { $lighty_config .= "ssl.ca-file = \"{$g['varetc_path']}/{$ca_location}\"\n\n"; } |