| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 2 | private function getAllowedNames() : array |
|
| 31 | { |
||
| 32 | // Add any SANS that might be on the certificate. |
||
| 33 | 2 | $allowedNames = $this->certificate->sans(); |
|
| 34 | |||
| 35 | 2 | $sslCertSubject = $this->certificate->subject(); |
|
| 36 | |||
| 37 | // Add the common name from the certificate. |
||
| 38 | 2 | if (isset($sslCertSubject['CN'])) { |
|
| 39 | 2 | $allowedNames[] = $sslCertSubject['CN']; |
|
| 40 | } |
||
| 41 | |||
| 42 | 2 | return $allowedNames; |
|
| 43 | } |
||
| 44 | |||
| 57 |