Skip to content
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

Fix exporting certificate keys on macOS 14.4. #99768

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

vcsjones
Copy link
Member

@vcsjones vcsjones commented Mar 14, 2024

Apple changed the error code we get back from a failed data-key export. This caused us to not attempt to export the key using the legacy APIs and assume the key export failed. This pull request adds the additional error code returned from macOS 14.4.

This also adds tests, since no existing tests were affected by Apple's change.

Fixes #99735

Apple changed the error code we get back from a failed data-key export. This caused us to not attempt to export the key using the legacy APIs and assume the key export failed.
This pull request adds the additional error code returned from macOS 14.4.
@vcsjones
Copy link
Member Author

Test failures are known. Build Analysis is green. Merging.

@vcsjones vcsjones merged commit f529d5d into dotnet:main Mar 14, 2024
107 of 111 checks passed
@vcsjones vcsjones deleted the fix-99735 branch March 14, 2024 18:24
@vcsjones
Copy link
Member Author

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/8285783507

@vcsjones
Copy link
Member Author

/backport to release/7.0-staging

@vcsjones
Copy link
Member Author

/backport to release/6.0-staging

Copy link
Contributor

Started backporting to release/7.0-staging: https://github.com/dotnet/runtime/actions/runs/8285791842

Copy link
Contributor

Started backporting to release/6.0-staging: https://github.com/dotnet/runtime/actions/runs/8285793440

Copy link
Contributor

@vcsjones backporting to release/7.0-staging failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix exporting certificate keys on macOS 14.4.
Using index info to reconstruct a base tree...
M	src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.cs
A	src/libraries/System.Security.Cryptography/tests/X509Certificates/CertTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Security.Cryptography.X509Certificates/tests/CertTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Security.Cryptography.X509Certificates/tests/CertTests.cs
Auto-merging src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix exporting certificate keys on macOS 14.4.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@vcsjones an error occurred while backporting to release/7.0-staging, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

Copy link
Contributor

@vcsjones backporting to release/6.0-staging failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix exporting certificate keys on macOS 14.4.
Using index info to reconstruct a base tree...
M	src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.cs
A	src/libraries/System.Security.Cryptography/tests/X509Certificates/CertTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Security.Cryptography.X509Certificates/tests/CertTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Security.Cryptography.X509Certificates/tests/CertTests.cs
Auto-merging src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SecKeyRef.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix exporting certificate keys on macOS 14.4.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

Copy link
Contributor

@vcsjones an error occurred while backporting to release/6.0-staging, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2024
@bartonjs bartonjs added the cryptographic-docs-impact Issues impacting cryptographic docs. Cleared and reused after documentation is updated each release. label Aug 15, 2024
@bartonjs bartonjs added the tracking This issue is tracking the completion of other related issues. label Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Security cryptographic-docs-impact Issues impacting cryptographic docs. Cleared and reused after documentation is updated each release. tracking This issue is tracking the completion of other related issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error exporting https certificate on macOS Sonoma 14.4
3 participants