| Conditions | 4 |
| Paths | 8 |
| Total Lines | 40 |
| Code Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | protected function invokeTestSuite() |
||
| 13 | { |
||
| 14 | $configuration = $this->getConfiguration(); |
||
| 15 | $globalConfig = $configuration->getGlobalConfig(); |
||
| 16 | |||
| 17 | // Check Service Communications Certificate |
||
| 18 | if (\SimpleSAML\Utils\HTTP::isHTTPS()) { |
||
| 19 | $input = array( |
||
| 20 | 'category' => 'Service Communications Certificate', |
||
| 21 | 'hostname' => $_SERVER['SERVER_NAME'], |
||
| 22 | 'port' => $_SERVER['SERVER_PORT'] |
||
| 23 | ); |
||
| 24 | $testData = new TestData($input); |
||
| 25 | |||
| 26 | $test = new TestCase\Cert\Remote($this, $testData); |
||
| 27 | $this->addTest($test); |
||
| 28 | } |
||
| 29 | |||
| 30 | // Check metadata signing certificate when available |
||
| 31 | if ($globalConfig->hasValue('metadata.sign.certificate')) { |
||
| 32 | $metadataCert = $globalConfig->getString('metadata.sign.certificate'); |
||
| 33 | |||
| 34 | $input = array( |
||
| 35 | 'certFile' => \SimpleSAML\Utils\Config::getCertPath($metadataCert), |
||
| 36 | 'category' => 'Metadata Signing Certificate' |
||
| 37 | ); |
||
| 38 | $testData = new TestData($input); |
||
| 39 | |||
| 40 | $test = new TestCase\Cert\File($this, $testData); |
||
| 41 | $this->addTest($test); |
||
| 42 | } |
||
| 43 | |||
| 44 | $tests = $this->getTests(); |
||
| 45 | foreach ($tests as $test) |
||
| 46 | { |
||
| 47 | $this->addMessages($test->getMessages()); |
||
| 48 | } |
||
| 49 | |||
| 50 | $this->calculateState(); |
||
| 51 | } |
||
| 52 | } |
||
| 53 |