|
@@ 607-616 (lines=10) @@
|
| 604 |
|
if (count($verifyResultAllcerts) == 0 || count($verifyResultEaponly) == 0) { |
| 605 |
|
throw new Exception("No output at all from openssl?"); |
| 606 |
|
} |
| 607 |
|
if (!preg_match("/OK$/", $verifyResultAllcerts[0])) { // case 1 |
| 608 |
|
if (preg_match("/certificate revoked$/", $verifyResultAllcerts[1])) { |
| 609 |
|
$testresults['cert_oddities'][] = RADIUSTests::CERTPROB_SERVER_CERT_REVOKED; |
| 610 |
|
} elseif (preg_match("/unable to get certificate CRL/", $verifyResultAllcerts[1])) { |
| 611 |
|
$testresults['cert_oddities'][] = RADIUSTests::CERTPROB_UNABLE_TO_GET_CRL; |
| 612 |
|
} else { |
| 613 |
|
$testresults['cert_oddities'][] = RADIUSTests::CERTPROB_TRUST_ROOT_NOT_REACHED; |
| 614 |
|
} |
| 615 |
|
return 1; |
| 616 |
|
} |
| 617 |
|
if (!preg_match("/OK$/", $verifyResultEaponly[0])) { // case 2 |
| 618 |
|
if (preg_match("/certificate revoked$/", $verifyResultEaponly[1])) { |
| 619 |
|
$testresults['cert_oddities'][] = RADIUSTests::CERTPROB_SERVER_CERT_REVOKED; |
|
@@ 617-626 (lines=10) @@
|
| 614 |
|
} |
| 615 |
|
return 1; |
| 616 |
|
} |
| 617 |
|
if (!preg_match("/OK$/", $verifyResultEaponly[0])) { // case 2 |
| 618 |
|
if (preg_match("/certificate revoked$/", $verifyResultEaponly[1])) { |
| 619 |
|
$testresults['cert_oddities'][] = RADIUSTests::CERTPROB_SERVER_CERT_REVOKED; |
| 620 |
|
} elseif (preg_match("/unable to get certificate CRL/", $verifyResultEaponly[1])) { |
| 621 |
|
$testresults['cert_oddities'][] = RADIUSTests::CERTPROB_UNABLE_TO_GET_CRL; |
| 622 |
|
} else { |
| 623 |
|
$testresults['cert_oddities'][] = RADIUSTests::CERTPROB_TRUST_ROOT_REACHED_ONLY_WITH_OOB_INTERMEDIATES; |
| 624 |
|
} |
| 625 |
|
return 2; |
| 626 |
|
} |
| 627 |
|
return 3; |
| 628 |
|
} |
| 629 |
|
|