Skip to content

Commit 0e935f1

Browse files
authored
Change BouncyCastle.Crypto.dll version 1.8.6 for Portable.BouncyCastl… (#579)
* Change BouncyCastle.Crypto.dll version 1.8.6 for Portable.BouncyCastle.dll version 1.9.0 on SecurityAPI modules. Issue#95274 * Change BouncyCastle.Crypto.dll version 1.8.6 for Portable.BouncyCastle.dll version 1.9.0 GeneXusJWT module Issue#95274
1 parent 0a41cab commit 0e935f1

File tree

14 files changed

+94
-64
lines changed

14 files changed

+94
-64
lines changed

dotnet/src/extensions/SecurityAPI/dotnet/dotnetcore/GeneXusCryptographyNetCore/GeneXusCryptographyNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</ItemGroup>
4747

4848
<ItemGroup>
49-
<PackageReference Include="Portable.BouncyCastle" Version="1.8.6.7" />
49+
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
5050
</ItemGroup>
5151

5252
<ItemGroup>

dotnet/src/extensions/SecurityAPI/dotnet/dotnetcore/GeneXusJWTNetCore/GeneXusJWTNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<PackageReference Include="Microsoft.IdentityModel.Logging" Version="6.5.0" />
3737
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.5.0" />
3838
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
39-
<PackageReference Include="Portable.BouncyCastle" Version="1.8.6.7" />
39+
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
4040
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.5.0" />
4141
</ItemGroup>
4242

dotnet/src/extensions/SecurityAPI/dotnet/dotnetcore/GeneXusXmlSignatureNetCore/GeneXusXmlSignatureNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</ItemGroup>
2727

2828
<ItemGroup>
29-
<PackageReference Include="Portable.BouncyCastle" Version="1.8.6.7" />
29+
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
3030
<PackageReference Include="System.Security.Cryptography.Xml" Version="4.7.0" />
3131
</ItemGroup>
3232

dotnet/src/extensions/SecurityAPI/dotnet/dotnetcore/SecurityAPICommonsNetCore/SecurityAPICommonsNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</ItemGroup>
3333

3434
<ItemGroup>
35-
<PackageReference Include="Portable.BouncyCastle" Version="1.8.6.7" />
35+
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
3636
<PackageReference Include="System.Security.Cryptography.Cng" Version="4.7.0" />
3737
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.3.0" />
3838
</ItemGroup>

dotnet/src/extensions/SecurityAPI/dotnet/dotnetframework/GeneXusCryptography/GeneXusCryptography.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<PackageId>GeneXus.SecurityApi.Cryptography</PackageId>
88
</PropertyGroup>
99
<ItemGroup>
10-
<ProjectReference Include="..\SecurityAPICommons\SecurityAPICommons.csproj"/>
10+
<ProjectReference Include="..\SecurityAPICommons\SecurityAPICommons.csproj" />
1111
</ItemGroup>
1212
<ItemGroup>
13-
<PackageReference Include="Portable.BouncyCastle" Version="1.8.6.7" />
13+
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
1414
</ItemGroup>
1515
</Project>

dotnet/src/extensions/SecurityAPI/dotnet/dotnetframework/GeneXusCryptography/Hash/Hashing.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-

1+
22
using GeneXusCryptography.Commons;
33
using GeneXusCryptography.HashUtils;
44
using SecurityAPICommons.Commons;
@@ -183,10 +183,10 @@ internal IDigest createHash(HashAlgorithm hashAlgorithm)
183183
return new Sha3Digest(384);
184184
case HashAlgorithm.SHA3_512:
185185
return new Sha3Digest(512);
186-
case HashAlgorithm.SHAKE_128:
186+
/*case HashAlgorithm.SHAKE_128:
187187
return new ShakeDigest(128);
188188
case HashAlgorithm.SHAKE_256:
189-
return new ShakeDigest(256);
189+
return new ShakeDigest(256);*/
190190
case HashAlgorithm.SM3:
191191
return new SM3Digest();
192192
case HashAlgorithm.TIGER:

dotnet/src/extensions/SecurityAPI/dotnet/dotnetframework/GeneXusCryptography/HashUtils/HashAlgorithm.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ public static HashAlgorithm getHashAlgorithm(string hashAlgorithm, Error error)
110110
case "SHA3-512":
111111
return HashAlgorithm.SHA3_512;
112112
case "SHAKE_128":
113-
return HashAlgorithm.SHAKE_128;
114-
case "SHAKE_256":
115-
return HashAlgorithm.SHAKE_256;
116-
case "SM3":
113+
error.setError("HA003", "Not implemented algorithm SHAKE_128");
114+
return HashAlgorithm.NONE;
115+
//return HashAlgorithm.SHAKE_128;
116+
case "SHAKE_256":
117+
error.setError("HA004", "Not implemented algorithm SHAKE_256");
118+
return HashAlgorithm.NONE;
119+
// return HashAlgorithm.SHAKE_256;
120+
case "SM3":
117121
return HashAlgorithm.SM3;
118122
case "TIGER":
119123
return HashAlgorithm.TIGER;
@@ -200,10 +204,10 @@ public static string valueOf(HashAlgorithm hashAlgorithm, Error error)
200204
return "SHA3_384";
201205
case HashAlgorithm.SHA3_512:
202206
return "SHA3_512";
203-
case HashAlgorithm.SHAKE_128:
207+
/* case HashAlgorithm.SHAKE_128:
204208
return "SHAKE_128";
205209
case HashAlgorithm.SHAKE_256:
206-
return "SHAKE_256";
210+
return "SHAKE_256";*/
207211
case HashAlgorithm.SM3:
208212
return "SM3";
209213
case HashAlgorithm.TIGER:

dotnet/src/extensions/SecurityAPI/dotnet/dotnetframework/GeneXusJWT/GeneXusJWT.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
<PackageReference Include="Microsoft.IdentityModel.Logging" Version="6.5.1" />
2121
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.5.1" />
2222
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
23-
<PackageReference Include="Portable.BouncyCastle" Version="1.8.6.7" />
23+
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
2424
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.5.1" />
2525
</ItemGroup>
2626

2727
<ItemGroup>
28-
<ProjectReference Include="..\SecurityAPICommons\SecurityAPICommons.csproj"/>
28+
<ProjectReference Include="..\SecurityAPICommons\SecurityAPICommons.csproj" />
2929
</ItemGroup>
3030
</Project>

dotnet/src/extensions/SecurityAPI/dotnet/dotnetframework/GeneXusXmlSignature/GeneXusXmlSignature.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
</PropertyGroup>
99
<ItemGroup>
1010
<ProjectReference Include="..\SecurityAPICommons\SecurityAPICommons.csproj" />
11-
<PackageReference Include="BouncyCastle" Version="1.8.6.1" />
12-
<PackageReference Include="Portable.BouncyCastle" Version="1.8.6.7" />
11+
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
1312
</ItemGroup>
1413
<ItemGroup>
1514
<Reference Include="System.Security" />

dotnet/src/extensions/SecurityAPI/dotnet/dotnetframework/SecurityAPICommons/Keys/PrivateKeyManager.cs

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -624,22 +624,30 @@ public AsymmetricAlgorithm getPrivateKeyForJWT()
624624
}
625625

626626

627-
private class PasswordFinder : IPasswordFinder
628-
{
629-
private string password;
630627

631-
public PasswordFinder(string password)
632-
{
633-
this.password = password;
634-
}
635628

629+
}
630+
631+
632+
[SecurityCritical]
633+
internal class PasswordFinder : IPasswordFinder
634+
{
635+
private string password;
636+
637+
638+
[SecurityCritical]
639+
public PasswordFinder(string password)
640+
{
641+
this.password = password;
642+
}
643+
644+
[SecurityCritical]
645+
public char[] GetPassword()
646+
{
647+
return this.password.ToCharArray();
648+
}
649+
}
636650

637-
public char[] GetPassword()
638-
{
639-
return this.password.ToCharArray();
640-
}
641-
}
642651

643652

644-
}
645653
}

0 commit comments

Comments
 (0)