Skip to content

Dead end S.Security.Cryptography.OpenSsl package #51854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/libraries/NetCoreAppLibrary.props
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
System.IO.Pipes.AccessControl;
System.Security.AccessControl;
System.Security.Cryptography.Cng;
System.Security.Cryptography.OpenSsl;
System.Security.Principal.Windows;
</NetCoreAppLibraryNoReference>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>windows;browser;android;ios;tvos</UnsupportedOSPlatforms>
<PackageDescription>Provides cryptographic algorithm implementations and key management for non-Windows systems with OpenSSL.

Commonly Used Types:
System.Security.Cryptography.RSAOpenSsl</PackageDescription>
</PropertyGroup>
</Project>
12 changes: 0 additions & 12 deletions src/libraries/System.Security.Cryptography.OpenSsl/NuGet.config

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace System.Security.Cryptography
{
public sealed partial class DSAOpenSsl : System.Security.Cryptography.DSA
public sealed class DSAOpenSsl : System.Security.Cryptography.DSA
{
public DSAOpenSsl() { }
public DSAOpenSsl(int keySize) { }
Expand All @@ -19,10 +19,30 @@ public override int KeySize { set { } }
protected override void Dispose(bool disposing) { }
public System.Security.Cryptography.SafeEvpPKeyHandle DuplicateKeyHandle() { throw null; }
public override System.Security.Cryptography.DSAParameters ExportParameters(bool includePrivateParameters) { throw null; }
protected override byte[] HashData(byte[] data, int offset, int count, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
protected override byte[] HashData(System.IO.Stream data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm) { throw null; }
public override void ImportParameters(System.Security.Cryptography.DSAParameters parameters) { }
public override bool VerifySignature(byte[] rgbHash, byte[] rgbSignature) { throw null; }
}
public sealed partial class ECDsaOpenSsl : System.Security.Cryptography.ECDsa
public sealed class ECDiffieHellmanOpenSsl : System.Security.Cryptography.ECDiffieHellman
{
public ECDiffieHellmanOpenSsl() { }
public ECDiffieHellmanOpenSsl(int keySize) { }
public ECDiffieHellmanOpenSsl(System.IntPtr handle) { }
public ECDiffieHellmanOpenSsl(System.Security.Cryptography.ECCurve curve) { }
public ECDiffieHellmanOpenSsl(System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle) { }
public override System.Security.Cryptography.ECDiffieHellmanPublicKey PublicKey { get { throw null; } }
public override byte[] DeriveKeyFromHash(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? secretPrepend, byte[]? secretAppend) { throw null; }
public override byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey, byte[]? secretPrepend, byte[]? secretAppend) { throw null; }
public override byte[] DeriveKeyMaterial(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey) { throw null; }
public override byte[] DeriveKeyTls(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, byte[] prfLabel, byte[] prfSeed) { throw null; }
public System.Security.Cryptography.SafeEvpPKeyHandle DuplicateKeyHandle() { throw null; }
public override System.Security.Cryptography.ECParameters ExportExplicitParameters(bool includePrivateParameters) { throw null; }
public override System.Security.Cryptography.ECParameters ExportParameters(bool includePrivateParameters) { throw null; }
public override void GenerateKey(System.Security.Cryptography.ECCurve curve) { }
public override void ImportParameters(System.Security.Cryptography.ECParameters parameters) { }
}
public sealed class ECDsaOpenSsl : System.Security.Cryptography.ECDsa
{
public ECDsaOpenSsl() { }
public ECDsaOpenSsl(int keySize) { }
Expand All @@ -42,7 +62,7 @@ public override void ImportParameters(System.Security.Cryptography.ECParameters
public override byte[] SignHash(byte[] hash) { throw null; }
public override bool VerifyHash(byte[] hash, byte[] signature) { throw null; }
}
public sealed partial class RSAOpenSsl : System.Security.Cryptography.RSA
public sealed class RSAOpenSsl : System.Security.Cryptography.RSA
{
public RSAOpenSsl() { }
public RSAOpenSsl(int keySize) { }
Expand All @@ -62,10 +82,11 @@ public override void ImportParameters(System.Security.Cryptography.RSAParameters
public override byte[] SignHash(byte[] hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw null; }
public override bool VerifyHash(byte[] hash, byte[] signature, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.RSASignaturePadding padding) { throw null; }
}
public sealed partial class SafeEvpPKeyHandle : System.Runtime.InteropServices.SafeHandle
public sealed class SafeEvpPKeyHandle : System.Runtime.InteropServices.SafeHandle
{
public SafeEvpPKeyHandle() : base (default(System.IntPtr), default(bool)) { }
public SafeEvpPKeyHandle(System.IntPtr handle, bool ownsHandle) : base (default(System.IntPtr), default(bool)) { }
public static long OpenSslVersion { get { throw null; } }
public override bool IsInvalid { get { throw null; } }
public System.Security.Cryptography.SafeEvpPKeyHandle DuplicateHandle() { throw null; }
protected override bool ReleaseHandle() { throw null; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent);netcoreapp3.0;net47</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">4.1.0.0</AssemblyVersion>
<!-- We need to build against net47 because that is where ECParameters got added inbox. We ship as net461 in order to not require
the facades when the package is restored. -->
<PackageTargetFramework Condition="'$(TargetFramework)' == 'net47'">net461</PackageTargetFramework>
</PropertyGroup>
<ItemGroup>
<SuppressPackageTargetFrameworkCompatibility Include="net461" />
<Compile Include="System.Security.Cryptography.OpenSsl.cs" />
<Compile Include="System.Security.Cryptography.OpenSsl.netcoreapp.cs" Condition="'$(TargetFramework)' == 'netcoreapp3.0' OR '$(TargetFramework)' == '$(NetCoreAppCurrent)'" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Algorithms\ref\System.Security.Cryptography.Algorithms.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Primitives\ref\System.Security.Cryptography.Primitives.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<Reference Include="System.IO" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Handles" />
<Reference Include="System.Security.Cryptography.Algorithms" />
<Reference Include="System.Security.Cryptography.Primitives" />
</ItemGroup>
</Project>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;netcoreapp3.0-Unix;netcoreapp3.0;net47</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
<AssemblyVersion Condition="$(TargetFramework.StartsWith('net4'))">4.1.0.0</AssemblyVersion>
<!-- We need to build against net47 because that is where ECParameters got added inbox. We ship as net461 in order to not require
the facades when the package is restored. -->
<PackageTargetFramework Condition="$(TargetFramework.StartsWith('net4'))">net461</PackageTargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetsUnix)' != 'true' or '$(TargetsAndroid)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
<GeneratePlatformNotSupportedAssemblyMessage>SR.PlatformNotSupported_CryptographyOpenSSL</GeneratePlatformNotSupportedAssemblyMessage>
<UnsupportedPlatformTarget>true</UnsupportedPlatformTarget>
<!-- Clear PackageTargetRuntime on Windows to package the PlatformNotSupported assembly
without a RID so that it applies in desktop packages.config projects as well -->
<PackageTargetRuntime />
</PropertyGroup>
<Import Project="$(CommonPath)System\Security\Cryptography\Asn1Reader\System.Security.Cryptography.Asn1Reader.Shared.projitems" Condition="'$(UnsupportedPlatformTarget)' != 'true'" />
<ItemGroup Condition="'$(UnsupportedPlatformTarget)' != 'true'">
Expand Down Expand Up @@ -110,8 +99,7 @@
<Compile Include="$(CommonPath)System\Security\Cryptography\RsaPaddingProcessor.cs"
Link="Common\System\Security\Cryptography\RsaPaddingProcessor.cs" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('$(NetCoreAppCurrent)')) or
$(TargetFramework.StartsWith('netcoreapp3.0'))">
<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Formats.Asn1\src\System.Formats.Asn1.csproj" />
<Reference Include="System.Buffers" />
<Reference Include="System.Collections" />
Expand All @@ -130,7 +118,4 @@
<Reference Include="System.Text.Encoding.Extensions" />
<Reference Include="System.Threading" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<SuppressPackageTargetFrameworkCompatibility Include="net461" />
</ItemGroup>
</Project>
9 changes: 5 additions & 4 deletions src/libraries/pkg/baseline/packageIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -6166,17 +6166,18 @@
"4.7.0",
"5.0.0"
],
"BaselineVersion": "6.0.0",
"InboxOn": {},
"BaselineVersion": "5.0.0",
"InboxOn": {
"net6.0": "6.0.0.0"
},
"AssemblyVersionInPackageVersion": {
"4.0.0.0": "4.0.0",
"4.0.1.0": "4.3.0",
"4.1.0.0": "4.4.0",
"4.1.1.0": "4.5.0",
"4.1.1.1": "4.5.1",
"4.1.2.0": "4.6.0",
"5.0.0.0": "5.0.0",
"6.0.0.0": "6.0.0"
"5.0.0.0": "5.0.0"
}
},
"System.Security.Cryptography.Pkcs": {
Expand Down

This file was deleted.