@@ 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 | ||
@@ 239-247 (lines=9) @@ | ||
236 | if(is_null($this->jwk)) |
|
237 | throw new JWSInvalidJWKException; |
|
238 | ||
239 | if($this->jwk->getKeyUse()->getString() !== JSONWebKeyPublicKeyUseValues::Signature) |
|
240 | throw new JWSInvalidJWKException |
|
241 | ( |
|
242 | sprintf |
|
243 | ( |
|
244 | 'use %s not supported ', |
|
245 | $this->jwk->getKeyUse()->getString() |
|
246 | ) |
|
247 | ); |
|
248 | ||
249 | if(is_null($this->jwk->getAlgorithm())) |
|
250 | throw new InvalidJWKAlgorithm('algorithm intended for use with the key is not set! '); |