diff --git a/core/diag/RADIUSTests.php b/core/diag/RADIUSTests.php index c583276a5..3dff63a8e 100644 --- a/core/diag/RADIUSTests.php +++ b/core/diag/RADIUSTests.php @@ -493,7 +493,7 @@ private function checkLineparse($inputarray, $desiredCheck) { switch ($desiredCheck) { case self::LINEPARSE_TLSVERSION: $version = []; - if (preg_match("/Using TLS version (.*)$/", $inputarray[$counter], $version)) { + if (isset($inputarray[$counter]) && preg_match("/Using TLS version (.*)$/", $inputarray[$counter], $version)) { switch (trim($version[1])) { case self::TLS_VERSION_1_3: return self::TLS_VERSION_1_3; @@ -739,7 +739,6 @@ private function createCArepository($tmpDir, &$intermOdditiesCAT, $servercert, $ private function thoroughChainChecks(&$testresults, &$intermOdditiesCAT, $tmpDir, $servercert, $eapIntermediates, $eapIntermediateCRLs) { $crlCheckString = $this->createCArepository($tmpDir, $intermOdditiesCAT, $servercert, $eapIntermediates, $eapIntermediateCRLs); - // ... and run the verification test $verifyResultEaponly = []; $verifyResultAllcerts = []; @@ -772,6 +771,7 @@ private function thoroughChainChecks(&$testresults, &$intermOdditiesCAT, $tmpDir if (count($verifyResultAllcerts) == 0 || count($verifyResultEaponly) == 0) { throw new Exception("No output at all from openssl?"); } + $testresults['cert_oddities'] = array(); if (!preg_match("/OK$/", $verifyResultAllcerts[0])) { // case 1 if (preg_match("/certificate revoked$/", $verifyResultAllcerts[1])) { $testresults['cert_oddities'][] = RADIUSTests::CERTPROB_SERVER_CERT_REVOKED; @@ -1356,8 +1356,10 @@ public function consolidateUdpResult($host) { $o = []; $o['code'] = $oddity; $o['message'] = isset($this->returnCodes[$oddity]["message"]) && $this->returnCodes[$oddity]["message"] ? $this->returnCodes[$oddity]["message"] : $oddity; - $o['level'] = $this->returnCodes[$oddity]["severity"]; - $ret['level'] = max($ret['level'], $this->returnCodes[$oddity]["severity"]); + if (isset($this->returnCodes[$oddity]['severity'])) { + $o['level'] = $this->returnCodes[$oddity]["severity"]; + $ret['level'] = max($ret['level'], $this->returnCodes[$oddity]["severity"]); + } $ret['cert_oddities'][] = $o; } \core\common\Entity::outOfThePotatoes(); diff --git a/core/diag/RADIUSTestsUI.php b/core/diag/RADIUSTestsUI.php index 1371ca8fc..755488fd7 100644 --- a/core/diag/RADIUSTestsUI.php +++ b/core/diag/RADIUSTestsUI.php @@ -317,42 +317,42 @@ public function printStatic() $hostindex = $udp->hostindex; $result = $udp->result[0]; $out[] = '
'; - $out[] = ''.sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']).''; + $out[] = sprintf(_("Testing from: %s"), \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']).''; + $out[] = ''; + $more .= ''.$certdesc. + '  '._("show server certificate details").'»'; + $out[] = $more . ''; + } + $out[] = ""; } $out[] = ''; return join('', $out); diff --git a/web/diag/action_realmcheck.php b/web/diag/action_realmcheck.php index fa22419db..4e13f704e 100644 --- a/web/diag/action_realmcheck.php +++ b/web/diag/action_realmcheck.php @@ -265,9 +265,16 @@ function clients(data, status) { state = notaccepted + ': ' + data.ca[key].certificate[c].resultcomment; } } - cliinfo = cliinfo + '
  • '; - cliinfo = cliinfo + '
    ' + state; - cliinfo = cliinfo + ' ' + add + '
  • '; + + cliinfo = cliinfo + '
  • '; + if (data.ca[key].certificate[c].finalerror && data.ca[key].certificate[c].finalerror==2) { + cliinfo = cliinfo + ' ' + '
  • '; + } else { + cliinfo = cliinfo + ''; + cliinfo = cliinfo + '
    ' + state; + cliinfo = cliinfo + ' ' + add + '
    '; + } + if (data.ca[key].certificate[c].finalerror === 1) { cliinfo = cliinfo + '
  • ' + restskipped + '
  • '; } @@ -378,7 +385,6 @@ function capath(data, status) { } function udp(data, status) { - console.log("udp - ajax - start"); show_debug(JSON.stringify(data)); var v = data.result[0]; $("#src" + data.hostindex + "_img").attr('src', icons[v.level]); @@ -413,12 +419,10 @@ function udp(data, status) { global_level_udp = Math.max(global_level_udp, v.level); $(".server_cert").show(); running_ajax_stat--; - console.log(running_ajax_stat); ajax_end(); } function ajax_end() { - console.log("ajax_end"); if (running_ajax_stat === 0) { $("#main_static_ico").attr('src', icons[global_level_udp]); $("#main_static_result").html(global_info[global_level_udp] + ' ' + ""); diff --git a/web/diag/show_realmcheck.php b/web/diag/show_realmcheck.php index e5de8a993..9bcc5f582 100644 --- a/web/diag/show_realmcheck.php +++ b/web/diag/show_realmcheck.php @@ -69,8 +69,10 @@ $('.moreall').removeClass('less'); $('.moreall').html(morealltext); } else { + console.log('MMMM'); $(this).attr('moretext', $(this).html()); $(this).addClass('less'); + console.log($(this).html()); $(this).html(lesstext); } $(this).parent().prev().toggle(); @@ -160,7 +162,7 @@ ?>
    - printDynamic(); ?> + printDynamic();?>