diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index 40eefcbcfc..af4cf71b01 100644
--- a/.github/workflows/dotnetcore.yml
+++ b/.github/workflows/dotnetcore.yml
@@ -44,10 +44,10 @@ jobs:
with:
global-json-file: ./global.json
- - name: Setup latest .NET 10 preview SDK
+ - name: Setup latest .NET 10 RC SDK
uses: actions/setup-dotnet@v5
with:
- dotnet-version: '10.0.100-rc.1.25451.107'
+ dotnet-version: 10.0.100-rc.1.25451.107
- name: Strong name bypass
run: |
diff --git a/build/dependencies.props b/build/dependencies.props
index 9e1cd68069..f0232f5953 100644
--- a/build/dependencies.props
+++ b/build/dependencies.props
@@ -11,7 +11,7 @@
6.0.2
4.5.5
4.5.0
- 8.0.5
+ 8.0.5
@@ -23,7 +23,7 @@
- 10.0.0-preview.*
+ 10.0.0-rc.1.25451.107
diff --git a/build/dependenciesTest.props b/build/dependenciesTest.props
index eec22132a3..d725d4b5c8 100644
--- a/build/dependenciesTest.props
+++ b/build/dependenciesTest.props
@@ -16,7 +16,7 @@
1.6.0
4.3.4
4.3.0
- 8.0.5
+ 8.0.5
4.3.1
2.9.2
2.8.2
@@ -40,8 +40,4 @@
8.10.0
-
-
- 10.0.0-preview.*
-
diff --git a/src/Microsoft.IdentityModel.Protocols.OpenIdConnect/Microsoft.IdentityModel.Protocols.OpenIdConnect.csproj b/src/Microsoft.IdentityModel.Protocols.OpenIdConnect/Microsoft.IdentityModel.Protocols.OpenIdConnect.csproj
index b2de806211..39275c3258 100644
--- a/src/Microsoft.IdentityModel.Protocols.OpenIdConnect/Microsoft.IdentityModel.Protocols.OpenIdConnect.csproj
+++ b/src/Microsoft.IdentityModel.Protocols.OpenIdConnect/Microsoft.IdentityModel.Protocols.OpenIdConnect.csproj
@@ -29,7 +29,7 @@
-
+
diff --git a/src/Microsoft.IdentityModel.Protocols.SignedHttpRequest/Microsoft.IdentityModel.Protocols.SignedHttpRequest.csproj b/src/Microsoft.IdentityModel.Protocols.SignedHttpRequest/Microsoft.IdentityModel.Protocols.SignedHttpRequest.csproj
index bb63b0f952..f3527ba404 100644
--- a/src/Microsoft.IdentityModel.Protocols.SignedHttpRequest/Microsoft.IdentityModel.Protocols.SignedHttpRequest.csproj
+++ b/src/Microsoft.IdentityModel.Protocols.SignedHttpRequest/Microsoft.IdentityModel.Protocols.SignedHttpRequest.csproj
@@ -33,7 +33,7 @@
-
+
diff --git a/src/Microsoft.IdentityModel.TestExtensions/Microsoft.IdentityModel.TestExtensions.csproj b/src/Microsoft.IdentityModel.TestExtensions/Microsoft.IdentityModel.TestExtensions.csproj
index a281f5bb88..976ef768d3 100644
--- a/src/Microsoft.IdentityModel.TestExtensions/Microsoft.IdentityModel.TestExtensions.csproj
+++ b/src/Microsoft.IdentityModel.TestExtensions/Microsoft.IdentityModel.TestExtensions.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/src/Microsoft.IdentityModel.Tokens/Microsoft.IdentityModel.Tokens.csproj b/src/Microsoft.IdentityModel.Tokens/Microsoft.IdentityModel.Tokens.csproj
index 25197b6b90..36ab7eec14 100644
--- a/src/Microsoft.IdentityModel.Tokens/Microsoft.IdentityModel.Tokens.csproj
+++ b/src/Microsoft.IdentityModel.Tokens/Microsoft.IdentityModel.Tokens.csproj
@@ -58,7 +58,7 @@
-
+
diff --git a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
index 5e5342b3e7..84b01a3c1e 100644
--- a/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
+++ b/test/Microsoft.IdentityModel.AotCompatibility.TestApp/Microsoft.IdentityModel.AotCompatibility.TestApp.csproj
@@ -2,7 +2,7 @@
net8.0;net9.0
- $(TargetFrameworks);
+ $(TargetFrameworks);net10.0
Exe
true
full
diff --git a/test/Microsoft.IdentityModel.TestUtils/Microsoft.IdentityModel.TestUtils.csproj b/test/Microsoft.IdentityModel.TestUtils/Microsoft.IdentityModel.TestUtils.csproj
index 3ba3fb9670..1b6c044b13 100644
--- a/test/Microsoft.IdentityModel.TestUtils/Microsoft.IdentityModel.TestUtils.csproj
+++ b/test/Microsoft.IdentityModel.TestUtils/Microsoft.IdentityModel.TestUtils.csproj
@@ -26,8 +26,8 @@
-
+
diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs
index d211e06720..b68c22af68 100644
--- a/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs
+++ b/test/Microsoft.IdentityModel.Tokens.Tests/AuthenticatedEncryptionProviderTests.cs
@@ -67,6 +67,19 @@ public class AuthenticatedEncryptionProviderTests
[Fact]
public void AesGcmEncryptionOnWindows()
{
+#if NET10_0_OR_GREATER
+ // AES-GCM is now supported on all platforms in .NET 10+
+ var context = new CompareContext();
+ try
+ {
+ var provider = new AuthenticatedEncryptionProvider(Default.SymmetricEncryptionKey256, SecurityAlgorithms.Aes256Gcm);
+ }
+ catch (Exception ex)
+ {
+ context.AddDiff($"AuthenticatedEncryptionProvider is not supposed to throw an exception, Exception:{ex.ToString()}");
+ }
+ TestUtilities.AssertFailIfErrors(context);
+#else
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Assert.Throws(() => new AuthenticatedEncryptionProvider(Default.SymmetricEncryptionKey256, SecurityAlgorithms.Aes256Gcm));
@@ -84,14 +97,18 @@ public void AesGcmEncryptionOnWindows()
}
TestUtilities.AssertFailIfErrors(context);
}
+#endif
}
#if NET
[Fact]
public void AesGcm_Dispose()
{
+#if !NET10_0_OR_GREATER
+ // In .NET 9 and below, AES-GCM is only supported on Windows
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Assert.Throws(() => new AuthenticatedEncryptionProvider(Default.SymmetricEncryptionKey256, SecurityAlgorithms.Aes256Gcm));
+#endif
AuthenticatedEncryptionProvider encryptionProvider = new AuthenticatedEncryptionProvider(Default.SymmetricEncryptionKey256, SecurityAlgorithms.Aes256Gcm);
encryptionProvider.Dispose();
diff --git a/test/Microsoft.IdentityModel.Tokens.Tests/ReferenceTests.cs b/test/Microsoft.IdentityModel.Tokens.Tests/ReferenceTests.cs
index a7cea9b727..06076a7350 100644
--- a/test/Microsoft.IdentityModel.Tokens.Tests/ReferenceTests.cs
+++ b/test/Microsoft.IdentityModel.Tokens.Tests/ReferenceTests.cs
@@ -58,6 +58,17 @@ public void ECDH_ESReferenceTest()
[Fact]
public void AesGcmReferenceTest()
{
+#if NET10_0_OR_GREATER
+ // AES-GCM is now supported on all platforms in .NET 10+
+ var context = new CompareContext();
+ var providerForDecryption = CryptoProviderFactory.Default.CreateAuthenticatedEncryptionProvider(new SymmetricSecurityKey(RSAES_OAEP_KeyWrap.CEK), AES_256_GCM.Algorithm);
+ var plaintext = providerForDecryption.Decrypt(AES_256_GCM.E, AES_256_GCM.A, AES_256_GCM.IV, AES_256_GCM.T);
+
+ if (!Utility.AreEqual(plaintext, AES_256_GCM.P))
+ context.AddDiff($"!Utility.AreEqual(plaintext, testParams.Plaintext)");
+
+ TestUtilities.AssertFailIfErrors(context);
+#else
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Assert.Throws(() => new AuthenticatedEncryptionProvider(Default.SymmetricEncryptionKey256, SecurityAlgorithms.Aes256Gcm));
@@ -73,6 +84,7 @@ public void AesGcmReferenceTest()
TestUtilities.AssertFailIfErrors(context);
}
+#endif
}
[Theory, MemberData(nameof(AuthenticatedEncryptionTheoryData), DisableDiscoveryEnumeration = true)]