@@ -16,73 +16,73 @@ |
||
16 | 16 | */ |
17 | 17 | abstract class AccessDescription |
18 | 18 | { |
19 | - /** |
|
20 | - * Access method OID. |
|
21 | - * |
|
22 | - * @var string |
|
23 | - */ |
|
24 | - protected $_accessMethod; |
|
19 | + /** |
|
20 | + * Access method OID. |
|
21 | + * |
|
22 | + * @var string |
|
23 | + */ |
|
24 | + protected $_accessMethod; |
|
25 | 25 | |
26 | - /** |
|
27 | - * Access location. |
|
28 | - * |
|
29 | - * @var GeneralName |
|
30 | - */ |
|
31 | - protected $_accessLocation; |
|
26 | + /** |
|
27 | + * Access location. |
|
28 | + * |
|
29 | + * @var GeneralName |
|
30 | + */ |
|
31 | + protected $_accessLocation; |
|
32 | 32 | |
33 | - /** |
|
34 | - * Constructor. |
|
35 | - * |
|
36 | - * @param string $method Access method OID |
|
37 | - * @param GeneralName $location Access location |
|
38 | - */ |
|
39 | - public function __construct($method, GeneralName $location) |
|
40 | - { |
|
41 | - $this->_accessMethod = $method; |
|
42 | - $this->_accessLocation = $location; |
|
43 | - } |
|
33 | + /** |
|
34 | + * Constructor. |
|
35 | + * |
|
36 | + * @param string $method Access method OID |
|
37 | + * @param GeneralName $location Access location |
|
38 | + */ |
|
39 | + public function __construct($method, GeneralName $location) |
|
40 | + { |
|
41 | + $this->_accessMethod = $method; |
|
42 | + $this->_accessLocation = $location; |
|
43 | + } |
|
44 | 44 | |
45 | - /** |
|
46 | - * Initialize from ASN.1. |
|
47 | - * |
|
48 | - * @param Sequence $seq |
|
49 | - * @return self |
|
50 | - */ |
|
51 | - public static function fromASN1(Sequence $seq): self |
|
52 | - { |
|
53 | - return new static($seq->at(0) |
|
54 | - ->asObjectIdentifier() |
|
55 | - ->oid(), GeneralName::fromASN1($seq->at(1)->asTagged())); |
|
56 | - } |
|
45 | + /** |
|
46 | + * Initialize from ASN.1. |
|
47 | + * |
|
48 | + * @param Sequence $seq |
|
49 | + * @return self |
|
50 | + */ |
|
51 | + public static function fromASN1(Sequence $seq): self |
|
52 | + { |
|
53 | + return new static($seq->at(0) |
|
54 | + ->asObjectIdentifier() |
|
55 | + ->oid(), GeneralName::fromASN1($seq->at(1)->asTagged())); |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * Get the access method OID. |
|
60 | - * |
|
61 | - * @return string |
|
62 | - */ |
|
63 | - public function accessMethod(): string |
|
64 | - { |
|
65 | - return $this->_accessMethod; |
|
66 | - } |
|
58 | + /** |
|
59 | + * Get the access method OID. |
|
60 | + * |
|
61 | + * @return string |
|
62 | + */ |
|
63 | + public function accessMethod(): string |
|
64 | + { |
|
65 | + return $this->_accessMethod; |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * Get the access location. |
|
70 | - * |
|
71 | - * @return GeneralName |
|
72 | - */ |
|
73 | - public function accessLocation(): GeneralName |
|
74 | - { |
|
75 | - return $this->_accessLocation; |
|
76 | - } |
|
68 | + /** |
|
69 | + * Get the access location. |
|
70 | + * |
|
71 | + * @return GeneralName |
|
72 | + */ |
|
73 | + public function accessLocation(): GeneralName |
|
74 | + { |
|
75 | + return $this->_accessLocation; |
|
76 | + } |
|
77 | 77 | |
78 | - /** |
|
79 | - * Generate ASN.1 structure. |
|
80 | - * |
|
81 | - * @return Sequence |
|
82 | - */ |
|
83 | - public function toASN1() |
|
84 | - { |
|
85 | - return new Sequence(new ObjectIdentifier($this->_accessMethod), |
|
86 | - $this->_accessLocation->toASN1()); |
|
87 | - } |
|
78 | + /** |
|
79 | + * Generate ASN.1 structure. |
|
80 | + * |
|
81 | + * @return Sequence |
|
82 | + */ |
|
83 | + public function toASN1() |
|
84 | + { |
|
85 | + return new Sequence(new ObjectIdentifier($this->_accessMethod), |
|
86 | + $this->_accessLocation->toASN1()); |
|
87 | + } |
|
88 | 88 | } |
@@ -9,31 +9,31 @@ |
||
9 | 9 | */ |
10 | 10 | class AuthorityAccessDescription extends AccessDescription |
11 | 11 | { |
12 | - /** |
|
13 | - * Access method OID's. |
|
14 | - * |
|
15 | - * @var string |
|
16 | - */ |
|
17 | - const OID_METHOD_OSCP = "1.3.6.1.5.5.7.48.1"; |
|
18 | - const OID_METHOD_CA_ISSUERS = "1.3.6.1.5.5.7.48.2"; |
|
12 | + /** |
|
13 | + * Access method OID's. |
|
14 | + * |
|
15 | + * @var string |
|
16 | + */ |
|
17 | + const OID_METHOD_OSCP = "1.3.6.1.5.5.7.48.1"; |
|
18 | + const OID_METHOD_CA_ISSUERS = "1.3.6.1.5.5.7.48.2"; |
|
19 | 19 | |
20 | - /** |
|
21 | - * Check whether access method is OSCP. |
|
22 | - * |
|
23 | - * @return bool |
|
24 | - */ |
|
25 | - public function isOSCPMethod(): bool |
|
26 | - { |
|
27 | - return self::OID_METHOD_OSCP === $this->_accessMethod; |
|
28 | - } |
|
20 | + /** |
|
21 | + * Check whether access method is OSCP. |
|
22 | + * |
|
23 | + * @return bool |
|
24 | + */ |
|
25 | + public function isOSCPMethod(): bool |
|
26 | + { |
|
27 | + return self::OID_METHOD_OSCP === $this->_accessMethod; |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
31 | - * Check whether access method is CA issuers. |
|
32 | - * |
|
33 | - * @return bool |
|
34 | - */ |
|
35 | - public function isCAIssuersMethod(): bool |
|
36 | - { |
|
37 | - return self::OID_METHOD_CA_ISSUERS === $this->_accessMethod; |
|
38 | - } |
|
30 | + /** |
|
31 | + * Check whether access method is CA issuers. |
|
32 | + * |
|
33 | + * @return bool |
|
34 | + */ |
|
35 | + public function isCAIssuersMethod(): bool |
|
36 | + { |
|
37 | + return self::OID_METHOD_CA_ISSUERS === $this->_accessMethod; |
|
38 | + } |
|
39 | 39 | } |