diff --git a/src/etc/inc/certs.inc b/src/etc/inc/certs.inc index a424a9d2a..fef4d987a 100644 --- a/src/etc/inc/certs.inc +++ b/src/etc/inc/certs.inc @@ -40,7 +40,8 @@ function &lookup_ca($refid) } } - return false; + $false = false; + return $false; } function &lookup_ca_by_subject($subject) @@ -94,6 +95,9 @@ function ca_chain_array(&$cert) if ($cert['caref']) { $chain = array(); $crt = lookup_ca($cert['caref']); + if (!$crt) { + return false; + } $chain[] = $crt; while ($crt) { $caref = isset($crt['caref']) ? $crt['caref'] : false; diff --git a/src/opnsense/mvc/app/library/OPNsense/Auth/Base.php b/src/opnsense/mvc/app/library/OPNsense/Auth/Base.php index 6e23fffed..fef7ed1b9 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Auth/Base.php +++ b/src/opnsense/mvc/app/library/OPNsense/Auth/Base.php @@ -284,7 +284,7 @@ abstract class Base $timeleft = $expected_time - ((microtime(true) - $tstart) * 1000000); if (!$result && $timeleft > 0) { - usleep($timeleft); + usleep((int)$timeleft); } return $result;