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 copying ephemeral keys to keychains #106973

Merged

Conversation

vcsjones
Copy link
Member

Starting on macOS Sequoia, at least in beta, SecKeychainitemCopyKeychain no longer returns errSecNoSuchKeychain for ephemeral keys. Instead, it returns errSecInvalidItemRef.

This adds the error code in the handling logic for when we need to add an ephemeral key to the target keychain.

Fixes #106775


With this change, I get a clean run of the S.S.C tests on Sequoia.
Screenshot 2024-08-26 at 1 00 36 PM

Starting on macOS Sequoia, at least in beta, SecKeychainitemCopyKeychain no longer returns errSecNoSuchKeychain for ephemeral keys.
Instead, it returns errSecInvalidItemRef.

This adds the error code in the handling logic for when we need to add an ephemeral key to the target keychain.
@vcsjones vcsjones added this to the 10.0.0 milestone Aug 26, 2024
@lewing
Copy link
Member

lewing commented Aug 26, 2024

I assume this needs to be backported too?

@vcsjones
Copy link
Member Author

I assume this needs to be backported too?

Yeah, to 9 and 8 at least.

@lewing
Copy link
Member

lewing commented Aug 26, 2024

/backport to release/9.0

Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/10567540827

@vcsjones
Copy link
Member Author

@bartonjs should we ba-g this? I've tried a few times to get those pipelines to pass and they are timing out for OSes unaffected by this change.

@lewing
Copy link
Member

lewing commented Aug 27, 2024

/ba-g multiple timeouts on lanes that are not impacted by the change

@lewing
Copy link
Member

lewing commented Aug 27, 2024

/backport to release/8.0

Copy link
Contributor

Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/10581683845

@lewing lewing merged commit 231cbb5 into dotnet:main Aug 27, 2024
94 of 98 checks passed
@vcsjones vcsjones deleted the fix-macos-sequoia-copy-ephemeral-import branch August 27, 2024 16:01
@lewing
Copy link
Member

lewing commented Aug 27, 2024

/backport to release/8.0-staging

Copy link
Contributor

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

@vcsjones
Copy link
Member Author

/backport to release/6.0-staging

@vcsjones
Copy link
Member Author

Yeah, we're gonna try for 6.0.

Copy link
Contributor

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

jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
Starting on macOS Sequoia, at least in beta, SecKeychainitemCopyKeychain no longer returns errSecNoSuchKeychain for ephemeral keys.
Instead, it returns errSecInvalidItemRef.

This adds the error code in the handling logic for when we need to add an ephemeral key to the target keychain.
@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CertificateRequest.CreateSelfSigned fails on macOS Sequoia
3 participants