Skip to content

Commit b726837

Browse files
renovate[bot]withinfocustrmartin4ike-kottlowski
authored
[deps]: Update dotnet monorepo to v8 (major) (#59)
* [deps]: Update dotnet monorepo to v8 * Additional changes for full .NET 8 upgrade * Bump library versions available in Bookworm * Bump YubiHSM package to match up with Bookworm * Few more bumps * Update KeyConnector.csproj --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Matt Bishop <[email protected]> Co-authored-by: Todd Martin <[email protected]> Co-authored-by: Ike <[email protected]>
1 parent 0bf221f commit b726837

File tree

6 files changed

+34
-26
lines changed

6 files changed

+34
-26
lines changed

.config/dotnet-tools.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"dotnet-ef": {
6+
"version": "8.0.2",
7+
"commands": ["dotnet-ef"]
8+
}
9+
}
10+
}

global.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"sdk": {
3-
"version": "6.0.100",
4-
"rollForward": "latestFeature"
5-
}
2+
"sdk": {
3+
"version": "8.0.100",
4+
"rollForward": "latestFeature"
65
}
6+
}

src/KeyConnector/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
FROM mcr.microsoft.com/dotnet/aspnet:6.0
1+
FROM mcr.microsoft.com/dotnet/aspnet:8.0
22

33
LABEL com.bitwarden.product="bitwarden"
44

55
RUN apt-get update \
66
&& apt-get install -y --no-install-recommends \
7-
gosu=1.12* \
8-
curl=7.74.0* \
9-
libc6-dev=2.31* \
10-
opensc=0.21.0* \
7+
gosu=1.14* \
8+
curl=7.88.1* \
9+
libc6-dev=2.36* \
10+
opensc=0.23.0* \
1111
&& rm -rf /var/lib/apt/lists/*
1212

1313
# Install YubiHSM2 SDK
14-
RUN curl -O https://developers.yubico.com/YubiHSM2/Releases/yubihsm2-sdk-2021-08-debian10-amd64.tar.gz \
14+
RUN curl -O https://developers.yubico.com/YubiHSM2/Releases/yubihsm2-sdk-2023-11-debian12-amd64.tar.gz \
1515
&& tar -xzf yubihsm2-sdk-*.tar.gz \
1616
&& rm yubihsm2-sdk-*.tar.gz \
1717
&& dpkg -i yubihsm2-sdk/libyubihsm-http1_*_amd64.deb \

src/KeyConnector/Exceptions/InvalidKeyTypeException.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@ public InvalidKeyTypeException(string message) : base(message) { }
1313

1414
public InvalidKeyTypeException(string message, Exception innerException)
1515
: base(message, innerException) { }
16-
17-
protected InvalidKeyTypeException(SerializationInfo info, StreamingContext context)
18-
: base(info, context) { }
1916
}
2017
}
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>Bit.KeyConnector</RootNamespace>
66
<UserSecretsId>bitwarden-KeyConnector</UserSecretsId>
7-
<GenerateRuntimeConfigurationFiles>True</GenerateRuntimeConfigurationFiles>
7+
<GenerateRuntimeConfigurationFiles>True</GenerateRuntimeConfigurationFiles>
8+
89
<Version>2024.3.1</Version>
910
</PropertyGroup>
1011

@@ -18,22 +19,22 @@
1819
<PackageReference Include="Google.Cloud.Kms.V1" Version="3.7.0"/>
1920
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1"/>
2021
<PackageReference Include="JsonFlatFileDataStore" Version="2.4.2"/>
21-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.14">
22+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2">
2223
<PrivateAssets>all</PrivateAssets>
2324
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2425
</PackageReference>
25-
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.14"/>
26-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.14"/>
27-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.14"/>
26+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.2"/>
27+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.2"/>
28+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.2"/>
2829
<PackageReference Include="MongoDB.Driver" Version="2.22.0"/>
29-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.11"/>
30+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2"/>
3031
<PackageReference Include="Pkcs11Interop" Version="5.1.2"/>
31-
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0"/>
32-
<PackageReference Include="Serilog.AspNetCore" Version="7.0.0"/>
33-
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.1"/>
32+
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.1"/>
33+
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1"/>
34+
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0"/>
3435
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1"/>
3536
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0"/>
3637
<PackageReference Include="VaultSharp" Version="1.7.0"/>
3738
</ItemGroup>
3839

39-
</Project>
40+
</Project>

src/KeyConnector/Services/CryptoFunctionService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class CryptoFunctionService : ICryptoFunctionService
88
{
99
public async Task<byte[]> AesGcmEncryptAsync(byte[] data, byte[] key)
1010
{
11-
using var aes = new AesGcm(key);
11+
using var aes = new AesGcm(key, AesGcm.TagByteSizes.MaxSize);
1212
var iv = await GetRandomBytesAsync(AesGcm.NonceByteSizes.MaxSize);
1313
var tag = new byte[AesGcm.TagByteSizes.MaxSize];
1414
var encData = new byte[data.Length];
@@ -25,7 +25,7 @@ public async Task<byte[]> AesGcmEncryptAsync(byte[] data, byte[] key)
2525

2626
public Task<byte[]> AesGcmDecryptAsync(byte[] data, byte[] key)
2727
{
28-
using var aes = new AesGcm(key);
28+
using var aes = new AesGcm(key, AesGcm.TagByteSizes.MaxSize);
2929
var endDataLength = data.Length - AesGcm.TagByteSizes.MaxSize - AesGcm.NonceByteSizes.MaxSize;
3030
var encData = new ArraySegment<byte>(data, 0, endDataLength);
3131
var tag = new ArraySegment<byte>(data, endDataLength, AesGcm.TagByteSizes.MaxSize);

0 commit comments

Comments
 (0)