1 | <?php |
||
28 | class Certificate implements ICertificate { |
||
29 | protected $name; |
||
30 | |||
31 | protected $commonName; |
||
32 | |||
33 | protected $organization; |
||
34 | |||
35 | protected $serial; |
||
36 | |||
37 | protected $issueDate; |
||
38 | |||
39 | protected $expireDate; |
||
40 | |||
41 | protected $issuerName; |
||
42 | |||
43 | protected $issuerOrganization; |
||
44 | |||
45 | /** |
||
46 | * @param string $data base64 encoded certificate |
||
47 | * @param string $name |
||
48 | * @throws \Exception If the certificate could not get parsed |
||
49 | */ |
||
50 | 12 | public function __construct($data, $name) { |
|
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | 1 | public function getName() { |
|
79 | |||
80 | /** |
||
81 | * @return string|null |
||
82 | */ |
||
83 | 1 | public function getCommonName() { |
|
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | 1 | public function getOrganization() { |
|
93 | |||
94 | /** |
||
95 | * @return \DateTime |
||
96 | */ |
||
97 | 1 | public function getIssueDate() { |
|
100 | |||
101 | /** |
||
102 | * @return \DateTime |
||
103 | */ |
||
104 | 1 | public function getExpireDate() { |
|
107 | |||
108 | /** |
||
109 | * @return bool |
||
110 | */ |
||
111 | public function isExpired() { |
||
115 | |||
116 | /** |
||
117 | * @return string|null |
||
118 | */ |
||
119 | 1 | public function getIssuerName() { |
|
122 | |||
123 | /** |
||
124 | * @return string|null |
||
125 | */ |
||
126 | public function getIssuerOrganization() { |
||
129 | } |
||
130 |