File tree Expand file tree Collapse file tree 7 files changed +46
-33
lines changed
Bundle/DependencyInjection/Source/KeyManagement Expand file tree Collapse file tree 7 files changed +46
-33
lines changed Original file line number Diff line number Diff line change 53
53
"brick/math" : " ^0.12" ,
54
54
"psr/clock" : " ^1.0" ,
55
55
"psr/event-dispatcher" : " ^1.0" ,
56
- "spomky-labs/pki-framework" : " ^1.1" ,
56
+ "spomky-labs/pki-framework" : " ^1.2. 1" ,
57
57
"symfony/config" : " ^7.0" ,
58
58
"symfony/console" : " ^7.0" ,
59
59
"symfony/dependency-injection" : " ^7.0" ,
Original file line number Diff line number Diff line change @@ -1840,6 +1840,41 @@ parameters:
1840
1840
count : 1
1841
1841
path : src/Library/KeyManagement/KeyConverter/ECKey.php
1842
1842
1843
+ -
1844
+ message : " #^Access to an undefined property Jose\\\\ Component\\\\ KeyManagement\\\\ UrlKeySetFactory\\ :\\ :\\ $requestFactory\\ .$#"
1845
+ count : 1
1846
+ path : src/Library/KeyManagement/UrlKeySetFactory.php
1847
+
1848
+ -
1849
+ message : " #^Call to an undefined method Jose\\\\ Component\\\\ KeyManagement\\\\ UrlKeySetFactory\\ :\\ :sendPsrRequest\\ (\\ )\\ .$#"
1850
+ count : 1
1851
+ path : src/Library/KeyManagement/UrlKeySetFactory.php
1852
+
1853
+ -
1854
+ message : " #^Call to function assert\\ (\\ ) with true will always evaluate to true\\ .$#"
1855
+ count : 1
1856
+ path : src/Library/KeyManagement/UrlKeySetFactory.php
1857
+
1858
+ -
1859
+ message : " #^Class Psr\\\\ Http\\\\ Client\\\\ ClientInterface not found\\ .$#"
1860
+ count : 3
1861
+ path : src/Library/KeyManagement/UrlKeySetFactory.php
1862
+
1863
+ -
1864
+ message : " #^Instanceof between Symfony\\\\ Contracts\\\\ HttpClient\\\\ HttpClientInterface and Symfony\\\\ Contracts\\\\ HttpClient\\\\ HttpClientInterface will always evaluate to true\\ .$#"
1865
+ count : 3
1866
+ path : src/Library/KeyManagement/UrlKeySetFactory.php
1867
+
1868
+ -
1869
+ message : " #^Method Jose\\\\ Component\\\\ KeyManagement\\\\ UrlKeySetFactory\\ :\\ :getContent\\ (\\ ) should return string but returns mixed\\ .$#"
1870
+ count : 1
1871
+ path : src/Library/KeyManagement/UrlKeySetFactory.php
1872
+
1873
+ -
1874
+ message : " #^Result of && is always false\\ .$#"
1875
+ count : 1
1876
+ path : src/Library/KeyManagement/UrlKeySetFactory.php
1877
+
1843
1878
-
1844
1879
message : " #^Parameter \\ #2 \\ $recipient of method Jose\\\\ Component\\\\ NestedToken\\\\ NestedTokenLoader\\ :\\ :checkContentTypeHeader\\ (\\ ) expects int, int\\ |null given\\ .$#"
1845
1880
count : 1
Original file line number Diff line number Diff line change @@ -35,15 +35,15 @@ public function getNodeDefinition(NodeDefinition $node): void
35
35
{
36
36
$ node ->children ()
37
37
->arrayNode ('jku_factory ' )
38
- ->canBeEnabled ()
39
- ->children ()
40
- ->scalarNode ('client ' )
41
- ->info ('HTTP Client used to retrieve key sets. ' )
42
- ->isRequired ()
43
- ->end ()
44
- ->end ()
38
+ ->canBeEnabled ()
39
+ ->children ()
40
+ ->scalarNode ('client ' )
41
+ ->info ('HTTP Client used to retrieve key sets. ' )
42
+ ->isRequired ()
45
43
->end ()
46
- ->end ();
44
+ ->end ()
45
+ ->end ()
46
+ ->end ();
47
47
}
48
48
49
49
#[Override]
Original file line number Diff line number Diff line change @@ -277,15 +277,6 @@ private static function loadPrivateKey(PEM $pem): array
277
277
{
278
278
try {
279
279
$ key = PrivateKey::fromPEM ($ pem );
280
- $ curve = self ::getCurve ($ key ->algorithmIdentifier ()->oid ());
281
- $ values = [
282
- 'kty ' => 'OKP ' ,
283
- 'crv ' => $ curve ,
284
- 'd ' => Base64UrlSafe::encodeUnpadded ($ key ->privateKeyData ()),
285
- ];
286
- return self ::populatePoints ($ key , $ values );
287
- } catch (Throwable ) {
288
- // no break
289
280
switch ($ key ->algorithmIdentifier ()->oid ()) {
290
281
case AlgorithmIdentifier::OID_RSASSA_PSS_ENCRYPTION :
291
282
assert ($ key instanceof RSASSAPSSPrivateKey);
@@ -317,19 +308,6 @@ private static function loadPrivateKey(PEM $pem): array
317
308
} catch (Throwable $ e ) {
318
309
throw new InvalidArgumentException ('Unable to load the key. ' , 0 , $ e );
319
310
}
320
- try {
321
- $ key = PublicKey::fromPEM ($ pem );
322
- $ curve = self ::getCurve ($ key ->algorithmIdentifier ()->oid ());
323
- self ::checkType ($ curve );
324
- return [
325
- 'kty ' => 'OKP ' ,
326
- 'crv ' => $ curve ,
327
- 'x ' => Base64UrlSafe::encodeUnpadded ((string ) $ key ->subjectPublicKey ()),
328
- ];
329
- } catch (Throwable ) {
330
- // no break
331
- }
332
- throw new InvalidArgumentException ('Unsupported key type ' );
333
311
}
334
312
335
313
/**
Original file line number Diff line number Diff line change 6
6
7
7
use Psr \Cache \CacheItemPoolInterface ;
8
8
use Psr \Http \Client \ClientInterface ;
9
- use Psr \Http \Message \RequestFactoryInterface ;
10
9
use RuntimeException ;
11
10
use Symfony \Component \Cache \Adapter \NullAdapter ;
12
11
use Symfony \Contracts \HttpClient \HttpClientInterface ;
12
+ use function assert ;
13
13
14
14
/**
15
15
* @see \Jose\Tests\Component\KeyManagement\UrlKeySetFactoryTest
Original file line number Diff line number Diff line change 43
43
"ext-mbstring" : " *" ,
44
44
"brick/math" : " ^0.12" ,
45
45
"psr/clock" : " ^1.0" ,
46
- "spomky-labs/pki-framework" : " ^1.1"
46
+ "spomky-labs/pki-framework" : " ^1.2. 1"
47
47
},
48
48
"conflict" : {
49
49
"spomky-labs/jose" : " *"
You can’t perform that action at this time.
0 commit comments