|
@@ 140-141 (lines=2) @@
|
| 137 |
|
if(is_null($this->jwk)) |
| 138 |
|
throw new JWSInvalidJWKException; |
| 139 |
|
|
| 140 |
|
if($this->jwk->getKeyUse()->getString() !== JSONWebKeyPublicKeyUseValues::Signature) |
| 141 |
|
throw new JWSInvalidJWKException(sprintf('use %s not supported.', $this->jwk->getKeyUse()->getString())); |
| 142 |
|
|
| 143 |
|
$alg = DigitalSignatures_MACs_Registry::getInstance()->get($this->header->getAlgorithm()->getString()); |
| 144 |
|
|
|
@@ 240-248 (lines=9) @@
|
| 237 |
|
if(is_null($this->jwk)) |
| 238 |
|
throw new JWSInvalidJWKException; |
| 239 |
|
|
| 240 |
|
if($this->jwk->getKeyUse()->getString() !== JSONWebKeyPublicKeyUseValues::Signature) |
| 241 |
|
throw new JWSInvalidJWKException |
| 242 |
|
( |
| 243 |
|
sprintf |
| 244 |
|
( |
| 245 |
|
'use %s not supported ', |
| 246 |
|
$this->jwk->getKeyUse()->getString() |
| 247 |
|
) |
| 248 |
|
); |
| 249 |
|
|
| 250 |
|
if(is_null($this->jwk->getAlgorithm())) |
| 251 |
|
throw new InvalidJWKAlgorithm('algorithm intended for use with the key is not set! '); |