@@ 149-159 (lines=11) @@ | ||
146 | * @param bool $fallback_on_x5c |
|
147 | * @return string |
|
148 | */ |
|
149 | public function getX509CertificateSha1Thumbprint($fallback_on_x5c = false) |
|
150 | { |
|
151 | $res = is_null($this[PublicJSONWebKeyParameters::X_509CertificateSHA_1_Thumbprint])? null : $this[PublicJSONWebKeyParameters::X_509CertificateSHA_1_Thumbprint]->getString(); |
|
152 | if(empty($res) && $fallback_on_x5c){ |
|
153 | $x509 = $this->getX509LeafCertificate(); |
|
154 | if(!is_null($x509)){ |
|
155 | return $x509->getSHA_1_Thumbprint(); |
|
156 | } |
|
157 | } |
|
158 | return $res; |
|
159 | } |
|
160 | ||
161 | /** |
|
162 | * @param bool $fallback_on_x5c |
|
@@ 165-175 (lines=11) @@ | ||
162 | * @param bool $fallback_on_x5c |
|
163 | * @return string |
|
164 | */ |
|
165 | public function getX509CertificateSha256Thumbprint($fallback_on_x5c = false) |
|
166 | { |
|
167 | $res = is_null($this[PublicJSONWebKeyParameters::X_509CertificateSHA_256_Thumbprint])? null : $this[PublicJSONWebKeyParameters::X_509CertificateSHA_256_Thumbprint]->getString(); |
|
168 | if(empty($res) && $fallback_on_x5c){ |
|
169 | $x509 = $this->getX509LeafCertificate(); |
|
170 | if(!is_null($x509)){ |
|
171 | return $x509->getSHA_256_Thumbprint(); |
|
172 | } |
|
173 | } |
|
174 | return $res; |
|
175 | } |
|
176 | ||
177 | /** |
|
178 | * @return string |