Skip to content

Commit c0c7378

Browse files
committed
PHPStan and PHPUnit are now not in requirements anymore.
They have to be installed manually
1 parent 7f97e1c commit c0c7378

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Jose\Bundle\JoseFramework\DependencyInjection\Source\SourceWithCompilerPasses;
1919
use Jose\Component\Encryption\Algorithm\ContentEncryption\AESCBCHS;
2020
use Jose\Component\Encryption\Algorithm\ContentEncryption\AESGCM;
21+
use Jose\Component\Encryption\Algorithm\KeyEncryption\A128CTR;
2122
use Jose\Component\Encryption\Algorithm\KeyEncryption\AESGCMKW;
2223
use Jose\Component\Encryption\Algorithm\KeyEncryption\AESKW;
2324
use Jose\Component\Encryption\Algorithm\KeyEncryption\Chacha20Poly1305;
@@ -94,7 +95,7 @@ public function load(array $configs, ContainerBuilder $container)
9495
*/
9596
private function getAlgorithmsFiles(): array
9697
{
97-
return [
98+
$list = [
9899
AESCBCHS::class => 'encryption_aescbc.yml',
99100
AESGCM::class => 'encryption_aesgcm.yml',
100101
AESGCMKW::class => 'encryption_aesgcmkw.yml',
@@ -103,8 +104,11 @@ private function getAlgorithmsFiles(): array
103104
ECDHES::class => 'encryption_ecdhes.yml',
104105
PBES2AESKW::class => 'encryption_pbes2.yml',
105106
RSA::class => 'encryption_rsa.yml',
106-
Chacha20Poly1305::class => 'encryption_experimental.yml',
107+
A128CTR::class => 'encryption_experimental.yml',
107108
];
109+
if (!in_array('chacha20-poly1305', openssl_get_cipher_methods())) {
110+
$list[Chacha20Poly1305::class] = 'encryption_experimental_chacha20_poly1305.yml';
111+
}
108112
}
109113

110114
/**

src/Bundle/JoseFramework/Resources/config/Algorithms/encryption_experimental.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ services:
1111
# They may be subject to changes.
1212
# ------------------------
1313

14-
Jose\Component\Encryption\Algorithm\KeyEncryption\Chacha20Poly1305:
15-
tags:
16-
- {'name': 'jose.algorithm', 'alias': 'chacha20-poly1305'}
17-
1814
Jose\Component\Encryption\Algorithm\KeyEncryption\A128CTR:
1915
tags:
2016
- {'name': 'jose.algorithm', 'alias': 'A128CTR'}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
services:
2+
_defaults:
3+
autowire: true
4+
autoconfigure: true
5+
public: false
6+
7+
# ---- New algorithms ----
8+
# These algorithms are out of the main specifications but referenced in
9+
# some WebAuthn documents.
10+
#
11+
# Specifically, chacha20-poly1305 requires a up to date OpenSSL version
12+
#
13+
# They may be subject to changes.
14+
# ------------------------
15+
16+
Jose\Component\Encryption\Algorithm\KeyEncryption\Chacha20Poly1305:
17+
tags:
18+
- {'name': 'jose.algorithm', 'alias': 'chacha20-poly1305'}

0 commit comments

Comments
 (0)