runtime icon indicating copy to clipboard operation
runtime copied to clipboard

System.PlatformNotSupportedException' occurred in System.Security.Cryptography.Algorithms.dll

Open furoraest opened this issue 8 years ago • 1 comments

Hope this is the right repo for this problem:

When trying to export from ECDiffieHellman to ECDiffieHellmanPublicKey.ToByteArray() the exception rises: Exception has occurred: CLR/System.PlatformNotSupportedException An exception of type 'System.PlatformNotSupportedException' occurred in System.Security.Cryptography.Algorithms.dll but was not handled in user code: 'Operation is not supported on this platform.' at System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanOpenSslPublicKey.ToByteArray()

.NET Core SDK (reflecting any global.json): Version: 2.1.401 Commit: 91b1c13032

Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /usr/share/dotnet/sdk/2.1.401/

Host (useful for support): Version: 2.1.3 Commit: 124038c13e

.NET Core SDKs installed: 2.1.401 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

When looking at the data stucture the value of ECDH key is presented as type: Microsoft.Win32.SafeHandles.SafeEcKeyHandle

Perhaps this is the problem? Method description lists net core 2.0 and 2.1 https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.ecdiffiehellmanpublickey.tobytearray?view=netframework-4.7.2

Best regards

furoraest avatar Aug 30 '18 17:08 furoraest

This issue was moved to dotnet/corefx#32036

jkotas avatar Aug 30 '18 18:08 jkotas