@@ 204-217 (lines=14) @@ | ||
201 | * |
|
202 | * @return Sequence |
|
203 | */ |
|
204 | public function toASN1() { |
|
205 | $elements = array(); |
|
206 | if (isset($this->_distributionPoint)) { |
|
207 | $elements[] = new ExplicitlyTaggedType(0, |
|
208 | $this->_distributionPoint->toASN1()); |
|
209 | } |
|
210 | if (isset($this->_reasons)) { |
|
211 | $elements[] = new ImplicitlyTaggedType(1, $this->_reasons->toASN1()); |
|
212 | } |
|
213 | if (isset($this->_issuer)) { |
|
214 | $elements[] = new ImplicitlyTaggedType(2, $this->_issuer->toASN1()); |
|
215 | } |
|
216 | return new Sequence(...$elements); |
|
217 | } |
|
218 | } |
|
219 |
@@ 203-218 (lines=16) @@ | ||
200 | * |
|
201 | * @return Sequence |
|
202 | */ |
|
203 | public function toASN1() { |
|
204 | $elements = array(); |
|
205 | if (isset($this->_baseCertificateID)) { |
|
206 | $elements[] = new ImplicitlyTaggedType(0, |
|
207 | $this->_baseCertificateID->toASN1()); |
|
208 | } |
|
209 | if (isset($this->_entityName)) { |
|
210 | $elements[] = new ImplicitlyTaggedType(1, |
|
211 | $this->_entityName->toASN1()); |
|
212 | } |
|
213 | if (isset($this->_objectDigestInfo)) { |
|
214 | $elements[] = new ImplicitlyTaggedType(2, |
|
215 | $this->_objectDigestInfo->toASN1()); |
|
216 | } |
|
217 | return new Sequence(...$elements); |
|
218 | } |
|
219 | ||
220 | /** |
|
221 | * Check whether Holder identifies given certificate. |
@@ 122-136 (lines=15) @@ | ||
119 | * @see \X509\AttributeCertificate\AttCertIssuer::ASN1() |
|
120 | * @return ImplicitlyTaggedType Tagged Sequence |
|
121 | */ |
|
122 | public function toASN1() { |
|
123 | $elements = array(); |
|
124 | if (isset($this->_issuerName)) { |
|
125 | $elements[] = $this->_issuerName->toASN1(); |
|
126 | } |
|
127 | if (isset($this->_baseCertificateID)) { |
|
128 | $elements[] = new ImplicitlyTaggedType(0, |
|
129 | $this->_baseCertificateID->toASN1()); |
|
130 | } |
|
131 | if (isset($this->_objectDigestInfo)) { |
|
132 | $elements[] = new ImplicitlyTaggedType(1, |
|
133 | $this->_objectDigestInfo->toASN1()); |
|
134 | } |
|
135 | return new ImplicitlyTaggedType(0, new Sequence(...$elements)); |
|
136 | } |
|
137 | ||
138 | /** |
|
139 | * |