-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Implement AuthenticationTagMismatchException exception #75160
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
Conversation
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones Issue DetailsThis introduces a new Previously for Android, we were assuming anything mean "auth tag mismatch". This changes the native shim to properly catch and handle the Android AEADBadTagException.
|
|
Draft to get a run through CI. Android is very unhappy in my local dev. |
src/native/libs/System.Security.Cryptography.Native.Android/pal_cipher.c
Outdated
Show resolved
Hide resolved
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The x86 and x64 Android legs passed. The ARM64 seemed to crash. I also cannot get the ARM64 tests to run locally, but that's true even on Marking as ready for review, then. |
...ies/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Cipher.cs
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AesCcm.Android.cs
Show resolved
Hide resolved
|
@jkoritzinsky can you weigh in on the JNI parts? |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@bartonjs @jkoritzinsky I am having a hard time parsing the results of the Android test runs. I don't see anything in the test results that look like a failure as a result from this change. Can either of you help me confirm that and this is okay to merge? |
|
It is related: Taken from one of the MonoRunner logs here |
src/native/libs/System.Security.Cryptography.Native.Android/pal_jni.c
Outdated
Show resolved
Hide resolved
…l_jni.c Co-authored-by: Filip Navara <[email protected]>
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
...ies/Common/src/Interop/Android/System.Security.Cryptography.Native.Android/Interop.Cipher.cs
Show resolved
Hide resolved
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This introduces a new
AuthenticationTagMismatchExceptionfor AEAD ciphers to throw during decryption when the authentication tag produces a mismatch.Previously for Android, we were assuming any failure meant "auth tag mismatch". This changes the native shim to properly catch and handle the Android AEADBadTagException.
Closes #67082