| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace SpomkyLabs\Pki\X509\Certificate\Extension; |
| 6 |
|
| 7 |
use SpomkyLabs\Pki\ASN1\Element; |
| 8 |
use SpomkyLabs\Pki\ASN1\Type\Primitive\NullType; |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
final class NoRevocationAvailableExtension extends Extension |
| 16 |
{ |
| 17 |
private function __construct(bool $critical) |
| 18 |
{ |
| 19 |
parent::__construct(self::OID_NO_REV_AVAIL, $critical); |
| 20 |
} |
| 21 |
|
| 22 |
public static function create(bool $critical): self |
| 23 |
{ |
| 24 |
return new self($critical); |
| 25 |
} |
| 26 |
|
| 27 |
protected static function fromDER(string $data, bool $critical): static |
| 28 |
{ |
| 29 |
NullType::fromDER($data); |
| 30 |
return self::create($critical); |
| 31 |
} |
| 32 |
|
| 33 |
protected function valueASN1(): Element |
| 34 |
{ |
| 35 |
return NullType::create(); |
| 36 |
} |
| 37 |
} |