diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-10-19 13:53:07 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-10-19 13:53:07 -0400 |
commit | 64c95322368fa309bcfca78073bcd5878f6ee212 (patch) | |
tree | 0dd42641bef9674dabf0216bb8a067d4b76955fa /config | |
parent | f30e2ae52236d9376d60e6224fdc43619f3946b9 (diff) | |
download | pfsense-packages-64c95322368fa309bcfca78073bcd5878f6ee212.tar.gz pfsense-packages-64c95322368fa309bcfca78073bcd5878f6ee212.tar.bz2 pfsense-packages-64c95322368fa309bcfca78073bcd5878f6ee212.zip |
Do not show blank lines
Diffstat (limited to 'config')
-rw-r--r-- | config/stunnel/stunnel.inc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/config/stunnel/stunnel.inc b/config/stunnel/stunnel.inc index 62558e34..b7b4e18e 100644 --- a/config/stunnel/stunnel.inc +++ b/config/stunnel/stunnel.inc @@ -23,14 +23,18 @@ if(!isset($_GET['id']) and !isset($_POST['id']) and $num_certs) { $cert=$certs[$i]; $_info=openssl_x509_parse(base64_decode($cert['cert_chain'])); $valid=floor(($_info['validTo_time_t']-time())/86400); - if(!openssl_x509_check_private_key(base64_decode($cert['cert_chain']), base64_decode($cert['cert_key']))) { - $_status='<font color="#AA0000"><b>Invalid key/cert!</b></font>'; - } elseif($valid<30) { - $_status='<font color="#B27D4B">Expires in '.$valid.' days!</font>'; + if($cert['cert_chain']) { + if(!openssl_x509_check_private_key(base64_decode($cert['cert_chain']), base64_decode($cert['cert_key']))) { + $_status='<font color="#AA0000"><b>Invalid key/cert!</b></font>'; + } elseif($valid<30) { + $_status='<font color="#B27D4B">Expires in '.$valid.' days!</font>'; + } else { + $_status='<font color="#008800">OK ('.$valid.' days)</font>'; + } + $config['installedpackages']['stunnelcerts']['config'][$i]['status']=$_status; } else { - $_status='<font color="#008800">OK ('.$valid.' days)</font>'; + unset($config['installedpackages']['stunnelcerts']['config'][$i]); } - $config['installedpackages']['stunnelcerts']['config'][$i]['status']=$_status; } } |