diff --git a/NuGet.config b/NuGet.config
index 74e7c1411d8a..8c974d5ecd32 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -9,6 +9,7 @@
+
diff --git a/docs/workflow/testing/libraries/testing-android.md b/docs/workflow/testing/libraries/testing-android.md
index b4c5179e6be9..abb8c2ec6b80 100644
--- a/docs/workflow/testing/libraries/testing-android.md
+++ b/docs/workflow/testing/libraries/testing-android.md
@@ -23,9 +23,9 @@ Android SDK and NDK can be automatically installed via the following script:
set -e
NDK_VER=r23c
-SDK_VER=6200805_latest
-SDK_API_LEVEL=29
-SDK_BUILD_TOOLS=29.0.3
+SDK_VER=9123335_latest
+SDK_API_LEVEL=33
+SDK_BUILD_TOOLS=33.0.1
if [[ "$OSTYPE" == "darwin"* ]]; then
HOST_OS=darwin
@@ -63,7 +63,7 @@ Android Studio offers a convenient UI:
Before running a build you might want to set the Android SDK and NDK environment variables:
```
export ANDROID_SDK_ROOT=
-export ANDROID_NDK_ROOT=
+export ANDROID_NDK_ROOT=
```
Now we're ready to build everything for Android:
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index f3527efef6b9..569c7743ca67 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,8 +1,8 @@
-
+
https://github.com/dotnet/icu
- d89651b995bbb9565a3674ddf77b187cb6f9f26d
+ bdaa3a0b2a204574ef4ab63bae2c4b5c6d607849
https://github.com/dotnet/msquic
@@ -48,13 +48,13 @@
https://github.com/dotnet/command-line-api
5618b2d243ccdeb5c7e50a298b33b13036b4351b
-
+
https://github.com/dotnet/emsdk
- 33b038b591f6e19c32a390333d41292cbd86d93c
+ ca510604d1667f32b4fa4653e3d3b64be8136bdc
-
+
https://github.com/dotnet/emsdk
- 33b038b591f6e19c32a390333d41292cbd86d93c
+ ca510604d1667f32b4fa4653e3d3b64be8136bdc
@@ -130,57 +130,57 @@
https://github.com/dotnet/arcade
02d5538bac1bacfd6fb310d92ab8914de08f3358
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
https://github.com/dotnet/llvm-project
@@ -278,13 +278,13 @@
https://dev.azure.com/dnceng/internal/_git/dotnet-optimization
5e0b0da43f660de5798186f4fd3bc900fc90576c
-
+
https://github.com/dotnet/hotreload-utils
- 6d7ba7d63a9c246a6477bda4d19c3315fd91868f
+ 74472cc407fe757b9479fd78cdb64d7d6e67935f
-
+
https://github.com/dotnet/runtime-assets
- ddb9487d79d1ba17a4fd872ffafe5f1cd7b406d6
+ 8a02fa4c0dca32e1402c1926eec810b8e45948a5
https://github.com/dotnet/roslyn-analyzers
diff --git a/eng/Versions.props b/eng/Versions.props
index 0d9e28a90a17..625e7058506c 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -22,8 +22,8 @@
false
false
$(AssemblyVersion)
- 7.0.15
- 7.0.15
+ 7.0.16
+ 7.0.16
@@ -118,20 +118,20 @@
4.5.0
7.0.0-rc.1.22414.6
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
- 7.0.0-beta.23566.2
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
+ 7.0.0-beta.24060.3
1.0.0-prerelease.22415.6
1.0.0-prerelease.22415.6
@@ -157,7 +157,7 @@
7.0.0-prerelease.24054.3
7.0.0-prerelease.24054.3
7.0.0-prerelease.24054.3
- 7.0.0-alpha.0.23566.1
+ 7.0.0-alpha.0.24060.2
2.4.2
1.0.0
2.4.5
@@ -177,7 +177,7 @@
7.0.100-1.23401.1
$(MicrosoftNETILLinkTasksVersion)
- 7.0.0-rtm.23565.2
+ 7.0.0-rtm.24060.3
2.2.3
7.0.0-alpha.1.22459.1
diff --git a/eng/native/ijw/IJW.cmake b/eng/native/ijw/IJW.cmake
index 81b69f0d965d..453dfb26b1ac 100644
--- a/eng/native/ijw/IJW.cmake
+++ b/eng/native/ijw/IJW.cmake
@@ -46,7 +46,7 @@ if (CLR_CMAKE_HOST_WIN32)
# 4365 - signed/unsigned mismatch
# 4679 - Could not import member. This is an issue with IJW and static abstract methods in interfaces.
- add_compile_options(/wd4365 /wd4679)
+ add_compile_options(/wd4365 /wd4679 /wd5271)
# IJW
add_compile_options(/clr:netcore)
diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml
index 2ec41d7682c7..0c0969520b0d 100644
--- a/eng/pipelines/common/platform-matrix.yml
+++ b/eng/pipelines/common/platform-matrix.yml
@@ -580,6 +580,29 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}
+- ${{ if containsValue(parameters.platforms, 'Android_arm64_perf_specific') }}:
+ - template: xplat-setup.yml
+ parameters:
+ jobTemplate: ${{ parameters.jobTemplate }}
+ helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
+ variables: ${{ parameters.variables }}
+ osGroup: Android
+ archType: arm64
+ targetRid: android-arm64
+ platform: Android_arm64
+ shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
+ container:
+ image: cbl-mariner-2.0-cross-android-amd64
+ registry: mcr
+ jobParameters:
+ runtimeFlavor: mono
+ stagedBuild: ${{ parameters.stagedBuild }}
+ buildConfig: ${{ parameters.buildConfig }}
+ ${{ if eq(parameters.passPlatforms, true) }}:
+ platforms: ${{ parameters.platforms }}
+ helixQueueGroup: ${{ parameters.helixQueueGroup }}
+ ${{ insert }}: ${{ parameters.jobParameters }}
+
# Mac Catalyst x64
- ${{ if containsValue(parameters.platforms, 'MacCatalyst_x64') }}:
diff --git a/eng/pipelines/common/restore-internal-tools.yml b/eng/pipelines/common/restore-internal-tools.yml
index eead4b67c30f..fdec41da53da 100644
--- a/eng/pipelines/common/restore-internal-tools.yml
+++ b/eng/pipelines/common/restore-internal-tools.yml
@@ -1,5 +1,5 @@
steps:
- - task: NuGetAuthenticate@0
+ - task: NuGetAuthenticate@1
inputs:
nuGetServiceConnections: 'devdiv/dotnet-core-internal-tooling'
forceReinstallCredentialProvider: true
diff --git a/eng/pipelines/coreclr/ci.yml b/eng/pipelines/coreclr/ci.yml
index ae8e4e421804..3b9ad9519b1d 100644
--- a/eng/pipelines/coreclr/ci.yml
+++ b/eng/pipelines/coreclr/ci.yml
@@ -153,13 +153,3 @@ jobs:
crossgen2: true
displayNameArgs: R2R_CG2
liveLibrariesBuildConfig: Release
-
-#
-# Formatting
-#
-- template: /eng/pipelines/common/platform-matrix.yml
- parameters:
- jobTemplate: /eng/pipelines/coreclr/templates/format-job.yml
- platforms:
- - Linux_x64
- - windows_x64
diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
index 9a60000c79d0..cbb49599d956 100644
--- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
+++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml
@@ -65,7 +65,7 @@ jobs:
buildConfig: release
runtimeFlavor: mono
platforms:
- - Android_arm64
+ - Android_arm64_perf_specific
jobParameters:
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
nameSuffix: AndroidMono
@@ -314,4 +314,4 @@ jobs:
projectFile: crossgen_perf.proj
runKind: crossgen_scenarios
runJobTemplate: /eng/pipelines/coreclr/templates/run-scenarios-job.yml
- logicalmachine: 'perftiger_crossgen'
\ No newline at end of file
+ logicalmachine: 'perftiger_crossgen'
diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml
index f61ee6d3efe4..ce7aaf1f9ad3 100644
--- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml
+++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml
@@ -31,7 +31,7 @@ jobs:
# Android arm64
- ${{ if in(parameters.platform, 'Android_arm64') }}:
- - Windows.10.Amd64.Android.Open
+ - Windows.11.Amd64.Android.Open
# Android x64
- ${{ if in(parameters.platform, 'Android_x64') }}:
diff --git a/eng/pipelines/installer/jobs/base-job.yml b/eng/pipelines/installer/jobs/base-job.yml
index 0155c095669c..b1fa3c3026b5 100644
--- a/eng/pipelines/installer/jobs/base-job.yml
+++ b/eng/pipelines/installer/jobs/base-job.yml
@@ -345,7 +345,7 @@ jobs:
displayName: Clean up old artifacts owned by root
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- - task: NuGetAuthenticate@0
+ - task: NuGetAuthenticate@1
- ${{ if eq(parameters.osGroup, 'windows') }}:
# NuGet's http cache lasts 30 minutes. If we're on a static machine, this may interfere with
diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml
index 554d44135ba3..68597d14960f 100644
--- a/eng/pipelines/libraries/helix-queues-setup.yml
+++ b/eng/pipelines/libraries/helix-queues-setup.yml
@@ -102,7 +102,7 @@ jobs:
- ${{ if in(parameters.platform, 'Android_x86', 'Android_x64', 'Linux_bionic_x64') }}:
- Ubuntu.1804.Amd64.Android.29.Open
- ${{ if in(parameters.platform, 'Android_arm', 'Android_arm64', 'Linux_bionic_arm64') }}:
- - Windows.10.Amd64.Android.Open
+ - Windows.11.Amd64.Android.Open
# iOS Simulator/Mac Catalyst arm64
- ${{ if in(parameters.platform, 'MacCatalyst_arm64', 'iOSSimulator_arm64') }}:
diff --git a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml
index 016b799e0099..213d56b3cf69 100644
--- a/eng/pipelines/official/jobs/prepare-signed-artifacts.yml
+++ b/eng/pipelines/official/jobs/prepare-signed-artifacts.yml
@@ -26,7 +26,7 @@ jobs:
fetchDepth: 20
- ${{ if eq(parameters.isOfficialBuild, true) }}:
- - task: NuGetAuthenticate@0
+ - task: NuGetAuthenticate@1
- task: MicroBuildSigningPlugin@2
displayName: Install MicroBuild plugin for Signing
diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1
index bd67e15fecdc..693591d73a2d 100644
--- a/eng/testing/performance/performance-setup.ps1
+++ b/eng/testing/performance/performance-setup.ps1
@@ -50,7 +50,7 @@ if ($Internal) {
"perftiger_crossgen" { $Queue = "Windows.10.Amd64.19H1.Tiger.Perf" }
"perfowl" { $Queue = "Windows.10.Amd64.20H2.Owl.Perf" }
"perfsurf" { $Queue = "Windows.10.Arm64.Perf.Surf" }
- "perfpixel4a" { $Queue = "Windows.10.Amd64.Pixel.Perf" }
+ "perfpixel4a" { $Queue = "Windows.11.Amd64.Pixel.Perf" }
"perfampere" { $Queue = "Windows.Server.Arm64.Perf" }
Default { $Queue = "Windows.10.Amd64.19H1.Tiger.Perf" }
}
diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh
index 09e3a5980eec..a5703929ec15 100755
--- a/eng/testing/performance/performance-setup.sh
+++ b/eng/testing/performance/performance-setup.sh
@@ -245,7 +245,7 @@ if [[ "$internal" == true ]]; then
extra_benchmark_dotnet_arguments=
if [[ "$logical_machine" == "perfiphone12mini" ]]; then
- queue=OSX.1015.Amd64.Iphone.Perf
+ queue=OSX.13.Amd64.Iphone.Perf
elif [[ "$logical_machine" == "perfampere" ]]; then
queue=Ubuntu.2004.Arm64.Perf
elif [[ "$architecture" == "arm64" ]]; then
diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OCSP.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OCSP.cs
index 59736b39f47e..8b07660a3fb6 100644
--- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OCSP.cs
+++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OCSP.cs
@@ -29,27 +29,30 @@ internal static partial class Crypto
int len,
SafeOcspRequestHandle req,
IntPtr subject,
- IntPtr issuer,
+ IntPtr* issuers,
+ int issuersLen,
ref long expiration);
internal static unsafe bool X509DecodeOcspToExpiration(
ReadOnlySpan buf,
SafeOcspRequestHandle request,
IntPtr x509Subject,
- IntPtr x509Issuer,
+ ReadOnlySpan x509Issuers,
out DateTimeOffset expiration)
{
long timeT = 0;
int ret;
fixed (byte* pBuf = buf)
+ fixed (IntPtr* pIssuers = x509Issuers)
{
ret = CryptoNative_X509DecodeOcspToExpiration(
pBuf,
buf.Length,
request,
x509Subject,
- x509Issuer,
+ pIssuers,
+ x509Issuers.Length,
ref timeT);
}
diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SSPI.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SSPI.cs
index c8e7dd364902..2e668f6c8463 100644
--- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SSPI.cs
+++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.SSPI.cs
@@ -67,6 +67,7 @@ internal enum ContextAttribute
SECPKG_ATTR_ISSUER_LIST_EX = 0x59, // returns SecPkgContext_IssuerListInfoEx
SECPKG_ATTR_CLIENT_CERT_POLICY = 0x60, // sets SecPkgCred_ClientCertCtlPolicy
SECPKG_ATTR_CONNECTION_INFO = 0x5A, // returns SecPkgContext_ConnectionInfo
+ SECPKG_ATTR_SESSION_INFO = 0x5D, // sets SecPkgContext_SessionInfo
SECPKG_ATTR_CIPHER_INFO = 0x64, // returns SecPkgContext_CipherInfo
SECPKG_ATTR_REMOTE_CERT_CHAIN = 0x67, // returns PCCERT_CONTEXT
SECPKG_ATTR_UI_INFO = 0x68, // sets SEcPkgContext_UiInfo
@@ -249,7 +250,7 @@ public enum Flags
SCH_CRED_IGNORE_REVOCATION_OFFLINE = 0x1000,
SCH_CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE = 0x2000,
SCH_SEND_ROOT_CERT = 0x40000,
- SCH_SEND_AUX_RECORD = 0x00200000,
+ SCH_SEND_AUX_RECORD = 0x00200000,
SCH_USE_STRONG_CRYPTO = 0x00400000,
SCH_USE_PRESHAREDKEY_ONLY = 0x800000,
SCH_ALLOW_NULL_ENCRYPTION = 0x02000000,
@@ -334,6 +335,21 @@ internal unsafe struct SecPkgCred_ClientCertPolicy
public char* pwszSslCtlIdentifier;
}
+ [StructLayout(LayoutKind.Sequential)]
+ internal unsafe struct SecPkgContext_SessionInfo
+ {
+ public uint dwFlags;
+ public uint cbSessionId;
+ public fixed byte rgbSessionId[32];
+
+ [Flags]
+ public enum Flags
+ {
+ Zero = 0,
+ SSL_SESSION_RECONNECT = 0x01,
+ };
+ }
+
[LibraryImport(Interop.Libraries.SspiCli, SetLastError = true)]
internal static partial int EncryptMessage(
ref CredHandle contextHandle,
diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs
index 81fdba8901bb..b13e217b7374 100644
--- a/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs
+++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs
@@ -298,6 +298,9 @@ private static bool QueryCertContextAttribute(ISSPIInterface secModule, SafeDele
public static bool QueryContextAttributes_SECPKG_ATTR_REMOTE_CERT_CONTEXT(ISSPIInterface secModule, SafeDeleteContext securityContext, out SafeFreeCertContext? certContext)
=> QueryCertContextAttribute(secModule, securityContext, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_REMOTE_CERT_CONTEXT, out certContext);
+ public static bool QueryContextAttributes_SECPKG_ATTR_LOCAL_CERT_CONTEXT(ISSPIInterface secModule, SafeDeleteContext securityContext, out SafeFreeCertContext? certContext)
+ => QueryCertContextAttribute(secModule, securityContext, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_LOCAL_CERT_CONTEXT, out certContext);
+
public static bool QueryContextAttributes_SECPKG_ATTR_REMOTE_CERT_CHAIN(ISSPIInterface secModule, SafeDeleteContext securityContext, out SafeFreeCertContext? certContext)
=> QueryCertContextAttribute(secModule, securityContext, Interop.SspiCli.ContextAttribute.SECPKG_ATTR_REMOTE_CERT_CHAIN, out certContext);
diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
index 12603f7df6ae..880189a74162 100644
--- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
+++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
@@ -4,6 +4,7 @@
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
+using System.Security.Cryptography.X509Certificates;
using System.Security.Authentication.ExtendedProtection;
using Microsoft.Win32.SafeHandles;
@@ -310,10 +311,15 @@ public override bool IsInvalid
internal sealed class SafeFreeCredential_SECURITY : SafeFreeCredentials
{
+#pragma warning disable 0649
+ // This is used only by SslStream but it is included elsewhere
+ public X509Certificate? LocalCertificate;
+#pragma warning restore 0649
public SafeFreeCredential_SECURITY() : base() { }
protected override bool ReleaseHandle()
{
+ LocalCertificate?.Dispose();
return Interop.SspiCli.FreeCredentialsHandle(ref _handle) == 0;
}
}
diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs
index 90de3cdee7b9..2962e25c6cd5 100644
--- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs
+++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs
@@ -148,7 +148,8 @@ public async Task UseCallback_ValidCertificate_ExpectedValuesDuringCallback(Conf
{
bool callbackCalled = false;
handler.CheckCertificateRevocationList = checkRevocation;
- handler.ServerCertificateCustomValidationCallback = (request, cert, chain, errors) => {
+ handler.ServerCertificateCustomValidationCallback = (request, cert, chain, errors) =>
+ {
callbackCalled = true;
Assert.NotNull(request);
@@ -227,6 +228,7 @@ public async Task NoCallback_BadCertificate_ThrowsException(string url)
}
[OuterLoop("Uses external servers")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/77726")]
[ConditionalFact(nameof(ClientSupportsDHECipherSuites))]
public async Task NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds()
{
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs
index e72d42e87d21..55a044d62a69 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/EncryptDecrypt.cs
@@ -338,19 +338,10 @@ private void RsaCryptRoundtrip(RSAEncryptionPadding paddingMode, bool expectSucc
Assert.Equal(TestData.HelloBytes, output);
}
- [ConditionalFact]
+ [ConditionalFact(nameof(PlatformSupportsEmptyRSAEncryption))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void RoundtripEmptyArray()
{
- if (OperatingSystem.IsIOS() && !OperatingSystem.IsIOSVersionAtLeast(13, 6))
- {
- throw new SkipTestException("iOS prior to 13.6 does not reliably support RSA encryption of empty data.");
- }
- if (OperatingSystem.IsTvOS() && !OperatingSystem.IsTvOSVersionAtLeast(14, 0))
- {
- throw new SkipTestException("tvOS prior to 14.0 does not reliably support RSA encryption of empty data.");
- }
-
using (RSA rsa = RSAFactory.Create(TestData.RSA2048Params))
{
void RoundtripEmpty(RSAEncryptionPadding paddingMode)
@@ -701,6 +692,26 @@ public void NotSupportedValueMethods()
}
}
+ [ConditionalTheory]
+ [InlineData(new byte[] { 1, 2, 3, 4 })]
+ [InlineData(new byte[0])]
+ public void Decrypt_Pkcs1_ErrorsForInvalidPadding(byte[] data)
+ {
+ if (data.Length == 0 && !PlatformSupportsEmptyRSAEncryption)
+ {
+ throw new SkipTestException("Platform does not support RSA encryption of empty data.");
+ }
+
+ using (RSA rsa = RSAFactory.Create(TestData.RSA2048Params))
+ {
+ byte[] encrypted = Encrypt(rsa, data, RSAEncryptionPadding.Pkcs1);
+ encrypted[1] ^= 0xFF;
+
+ // PKCS#1, the data, and the key are all deterministic so this should always throw an exception.
+ Assert.ThrowsAny(() => Decrypt(rsa, encrypted, RSAEncryptionPadding.Pkcs1));
+ }
+ }
+
public static IEnumerable