1 | <?php |
||
16 | class IssuerAlternativeNameExtension extends Extension |
||
17 | { |
||
18 | /** |
||
19 | * Names. |
||
20 | * |
||
21 | * @var GeneralNames |
||
22 | */ |
||
23 | protected $_names; |
||
24 | |||
25 | /** |
||
26 | * Constructor. |
||
27 | * |
||
28 | * @param bool $critical |
||
29 | * @param GeneralNames $names |
||
30 | */ |
||
31 | 10 | public function __construct(bool $critical, GeneralNames $names) |
|
35 | 10 | } |
|
36 | |||
37 | /** |
||
38 | * Get names. |
||
39 | * |
||
40 | * @return GeneralNames |
||
41 | */ |
||
42 | 2 | public function names(): GeneralNames |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 9 | protected static function _fromDER(string $data, bool $critical): Extension |
|
51 | { |
||
52 | 9 | return new self($critical, |
|
53 | 9 | GeneralNames::fromASN1( |
|
54 | 9 | UnspecifiedType::fromDER($data)->asSequence())); |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | 15 | protected function _valueASN1(): Element |
|
63 | } |
||
64 | } |
||
65 |