[Neo Wallet Fix] Add cert import exception#3279
[Neo Wallet Fix] Add cert import exception#3279NGDAdmin merged 11 commits intoneo-project:masterfrom
Conversation
|
|
||
| public override WalletAccount Import(X509Certificate2 cert) | ||
| { | ||
| if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) |
There was a problem hiding this comment.
Can it be implemented with 3rd-party libraries for OSX?
There was a problem hiding this comment.
have tried, cant extract the private key. nothing in the ecdsa or cert is implementated on the macos that can help.
There was a problem hiding this comment.
not necessary, no one use this. exception is fine already.
There was a problem hiding this comment.
If openssl is installed on the machine and configured right. dotnet will use it automatically.
There was a problem hiding this comment.
but if it works with openssl installed, with this condition it wont never work
|
time to fix the random error: Warning: D:\a\neo\neo\src\Neo\SmartContract\ApplicationEngine.cs(256,27): warning CS0618: 'ApplicationEngine.GasConsumed' is obsolete: 'This property is deprecated. Use FeeConsumed instead.' [D:\a\neo\neo\src\Neo\Neo.csproj::TargetFramework=net8.0] |
No reason to have this PR. Tests were working fine as before. So that shows that this works on macos.
What a disrespectful expression, feels like i am faking the issue: Test method Neo.UnitTests.Wallets.NEP6.UT_NEP6Wallet.TestImportCert threw exception:
Interop+AppleCrypto+AppleCFErrorCryptographicException: The operation couldn’t be completed. (OSStatus error -67738 - CSSM Exception: -2147415780 CSSMERR_CSP_INVALID_KEYATTR_MASK)
at Interop.AppleCrypto.TrySecKeyCopyExternalRepresentation(SafeSecKeyRefHandle key, Byte[]& externalRepresentation)
at System.Security.Cryptography.EccSecurityTransforms.TryExportDataKeyParameters(SecKeyPair keys, Boolean includePrivateParameters, ECParameters& ecParameters)
at System.Security.Cryptography.EccSecurityTransforms.ExportParameters(Boolean includePrivateParameters, Int32 keySizeInBits)
at Neo.Wallets.NEP6.NEP6Wallet.Import(X509Certificate2 cert) in /Users/jinghuiliao/git/neo/src/Neo/Wallets/NEP6/NEP6Wallet.cs:line 229
at Neo.UnitTests.Wallets.NEP6.UT_NEP6Wallet.TestImportCert() in /Users/jinghuiliao/git/neo/tests/Neo.UnitTests/Wallets/NEP6/UT_NEP6Wallet.cs:line 305
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
|
|
@neo-project/core finally fixed with BouncyCastle |
Is this on your computer? Then does the tests work on |
That's logic doesn't work in mac? |
It would have to be working. It is currently in the code right now. I think his computer isn't configured right. |
Description
Dotnet has no implementation of
ExportParametersfor ECdsa, thus causing theImportmethod fail.Fixes # (issue)
Type of change
How Has This Been Tested?
Updated the Unit test of
TestImportCertin UT_NEP6Wallet.csTest Configuration:
Checklist: