-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Linux and Mac have CryptographicException with generic HResult for bad password opening a PFX #735
Comments
Is this a change from 3.0 to 3.1 then? |
No, 3.x -> 5 (the custom PFX loader change) |
Thanks, misread. |
Windows appears to use Line 228 in 73eec1b
|
@vcsjones Yep. You wanna take it? :) |
@bartonjs sure. |
Looking at this a bit more, the Win32 PAL is inconsistent between the PAL using an HRESULT and a Win32 status code when setting the HResult on the In some cases, Line 153 in de12f85
So In another case, Line 77 in de12f85
So I suppose a question for @bartonjs then is, which is preferable for the Unix PAL to do? Do we want to do anything about the Windows PAL? |
Looks like .NET Framework threw with HResult=0x80070056 in both the collection and the single-cert case. (Largely because in .NET Framework we or-in 80070000 if the high bit isn't already set: https://referencesource.microsoft.com/#mscorlib/system/security/cryptography/crypto.cs,108; perhaps that's missing in the ToCryptographicException extension method) |
The Invalid ASN and bad password have both generic HResult in netcore5.0, so we're not able to differentiate them as we did in netcore3.0.
Can you pls help us change HResult for bad password? Thanks!
The text was updated successfully, but these errors were encountered: