Skip to content

Commit 8fbf206

Browse files
authored
Fold S.S.C.Encoding into new System.Security.Cryptography library
* Split the new library from just NetCoreAppCurrent to all of the varieties that S.S.C.Encoding had, plus browser. * Move src/libraries/System.Security.Cryptography.Encoding/src/System/... to src/libraries/System.Security.Cryptography/src/System/... * Move src/libraries/System.Security.Cryptography.Encoding/src/Internal/Cryptography/* to src/libraries/System.Security.Cryptography.Encoding/src/System/Security/Cryptography/* * Merge in the Strings.resx content that was needed. * Added two ObjectDisposedException.ThrowIf calls to eliminate a resource from the move. * Move src/libraries/System.Security.Cryptography.Encoding/tests/... to src/libraries/System.Security.Cryptography.Encoding/tests/..., with a couple files gaining the "Tests" suffix that their class had. * Fix the namespaces of the previously moved from-Primitives tests to match the new location. * Fix the namespaces of the newly moved from-Encoding tests to match the new location. * Make System.Security.Cryptography.Encoding ref & src just build as facades/forwarders.
1 parent 82d667c commit 8fbf206

File tree

59 files changed

+386
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+386
-546
lines changed

src/libraries/Common/tests/System/Security/Cryptography/PlatformSupport.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ internal static class PlatformSupport
1212
internal const TestPlatforms AppleCrypto = TestPlatforms.OSX | TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst;
1313
internal const TestPlatforms MobileAppleCrypto = TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst;
1414

15-
// Platforms that support OpenSSL - all Unix except OSX/iOS/tvOS/MacCatalyst and Android
16-
internal const TestPlatforms OpenSSL = TestPlatforms.AnyUnix & ~(AppleCrypto | TestPlatforms.Android);
15+
// Platforms that support OpenSSL - all Unix except OSX/iOS/tvOS/MacCatalyst, Android, and Browser
16+
internal const TestPlatforms OpenSSL = TestPlatforms.AnyUnix & ~(AppleCrypto | TestPlatforms.Android | TestPlatforms.Browser);
1717

1818
// Whether or not the current platform supports RC2
1919
internal static readonly bool IsRC2Supported = !PlatformDetection.IsAndroid;

src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ System.Net.Http.WinHttpHandler</PackageDescription>
125125
<Reference Include="System.Threading" />
126126
</ItemGroup>
127127

128+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
129+
<Reference Include="System.Security.Cryptography" />
130+
</ItemGroup>
131+
128132
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.1'))">
129133
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
130134
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />

src/libraries/System.Net.Quic/src/System.Net.Quic.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
<Reference Include="System.Runtime" />
122122
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
123123
<Reference Include="System.Runtime.InteropServices" />
124-
<Reference Include="System.Security.Cryptography.Encoding" />
124+
<Reference Include="System.Security.Cryptography" />
125125
<Reference Include="System.Security.Cryptography.X509Certificates" />
126126
<Reference Include="System.Threading" />
127127
<Reference Include="System.Threading.Channels" />

src/libraries/System.Net.Security/src/System.Net.Security.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@
425425
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
426426
<Reference Include="System.Runtime.InteropServices" />
427427
<Reference Include="System.Security.Claims" />
428-
<Reference Include="System.Security.Cryptography.Encoding" />
428+
<Reference Include="System.Security.Cryptography" />
429429
<Reference Include="System.Security.Cryptography.X509Certificates" />
430430
<Reference Include="System.Security.Principal" />
431431
<Reference Include="System.Threading" />

src/libraries/System.Security.Cryptography.Encoding/System.Security.Cryptography.Encoding.sln

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptograph
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.Encoding", "src\System.Security.Cryptography.Encoding.csproj", "{4B1D276E-6576-4F42-9F38-C91C95437F20}"
1515
EndProject
16-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Security.Cryptography.Encoding.Tests", "tests\System.Security.Cryptography.Encoding.Tests.csproj", "{8A8D5FD7-557E-42EF-AA8A-5453E82574F2}"
17-
EndProject
18-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{179D2235-ABD5-45D9-8DAB-E24763305362}"
19-
EndProject
2016
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{34B969D7-6BED-4597-8C25-502A29CF0518}"
2117
EndProject
2218
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0806AC6F-4837-437A-A32F-EED211934481}"
@@ -55,17 +51,11 @@ Global
5551
{4B1D276E-6576-4F42-9F38-C91C95437F20}.Debug|Any CPU.Build.0 = Debug|Any CPU
5652
{4B1D276E-6576-4F42-9F38-C91C95437F20}.Release|Any CPU.ActiveCfg = Release|Any CPU
5753
{4B1D276E-6576-4F42-9F38-C91C95437F20}.Release|Any CPU.Build.0 = Release|Any CPU
58-
{8A8D5FD7-557E-42EF-AA8A-5453E82574F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59-
{8A8D5FD7-557E-42EF-AA8A-5453E82574F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
60-
{8A8D5FD7-557E-42EF-AA8A-5453E82574F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
61-
{8A8D5FD7-557E-42EF-AA8A-5453E82574F2}.Release|Any CPU.Build.0 = Release|Any CPU
6254
EndGlobalSection
6355
GlobalSection(SolutionProperties) = preSolution
6456
HideSolutionNode = FALSE
6557
EndGlobalSection
6658
GlobalSection(NestedProjects) = preSolution
67-
{201E9083-CCA0-4AA8-A2B2-B37AC13481E3} = {179D2235-ABD5-45D9-8DAB-E24763305362}
68-
{8A8D5FD7-557E-42EF-AA8A-5453E82574F2} = {179D2235-ABD5-45D9-8DAB-E24763305362}
6959
{A428E072-E4DD-4F64-AFE3-DC9FC8D5563D} = {34B969D7-6BED-4597-8C25-502A29CF0518}
7060
{465CB04B-D2D8-4E64-BA6D-571BE95391B4} = {34B969D7-6BED-4597-8C25-502A29CF0518}
7161
{43B33B0D-4009-4838-B9F4-E5308C1827F7} = {0806AC6F-4837-437A-A32F-EED211934481}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// ------------------------------------------------------------------------------
4+
// Changes to this file must follow the https://aka.ms/api-review process.
5+
// ------------------------------------------------------------------------------
6+
7+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsnEncodedData))]
8+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsnEncodedDataCollection))]
9+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.AsnEncodedDataEnumerator))]
10+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.FromBase64Transform))]
11+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.FromBase64TransformMode))]
12+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.Oid))]
13+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.OidCollection))]
14+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.OidEnumerator))]
15+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.OidGroup))]
16+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.PemEncoding))]
17+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.PemFields))]
18+
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.ToBase64Transform))]

src/libraries/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.cs

Lines changed: 0 additions & 145 deletions
This file was deleted.

src/libraries/System.Security.Cryptography.Encoding/ref/System.Security.Cryptography.Encoding.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<Nullable>enable</Nullable>
55
</PropertyGroup>
66
<ItemGroup>
7-
<Compile Include="System.Security.Cryptography.Encoding.cs" />
7+
<Compile Include="System.Security.Cryptography.Encoding.Forwards.cs" />
88
</ItemGroup>
99
<ItemGroup>
1010
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
1111
<ProjectReference Include="..\..\System.Security.Cryptography\ref\System.Security.Cryptography.csproj" />
1212
</ItemGroup>
13-
</Project>
13+
</Project>

0 commit comments

Comments
 (0)