| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 8 | public function validate(IValidate $entry): void |
|
| 34 | { |
||
| 35 | 8 | if (!$this->libStatus->allowCert($this->userSource->getStatus())) { |
|
| 36 | 4 | throw new RuleException($this->errorText); |
|
| 37 | } |
||
| 38 | 4 | $col = implode($this->glue, $this->sentInputs() + [$this->certSource->getSalt()]); |
|
| 39 | 4 | if (1 !== openssl_verify($col, strval($entry->getValue()), $this->certSource->getPubKey(), OPENSSL_ALGO_SHA256)) { |
|
| 40 | 1 | throw new RuleException($this->errorText); |
|
| 41 | } |
||
| 44 |