v3.0.4: Import the private key via SecItemImport (ad-hoc builds lack keychain entitlements) - #5
Merged
Merged
Conversation
…keychain entitlements) SecItemAdd for private keys routes through the data-protection keychain, which rejects ad-hoc-signed apps with errSecMissingEntitlement (-34018) — exactly the status reported in the field. Import the key PEM into the login keychain with the legacy SecItemImport API instead, which carries no entitlement requirement, then pair with SecIdentityCreateWithCertificate as before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GMD3Q7bnJ9vJDdkaiuBN4Y
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The v3.0.3 diagnostics pinpointed the client-identity failure:
key: -34018(errSecMissingEntitlement).SecItemAddfor private keys routes through the data-protection keychain, which rejects apps without a provisioning entitlement — and Portside's release builds are ad-hoc signed (no Apple Developer certificate).Fix: import the key PEM into the login keychain with the legacy
SecItemImportAPI, which has no entitlement requirement and grants this app ACL access to the key.SecIdentityCreateWithCertificatethen pairs it with the certificate as introduced in v3.0.3. A duplicate import (errSecDuplicateItem) counts as success — the key from a previous run is the same key.The certificate add (
SecItemAdd, file keychain) was already working (-25299duplicate) and is unchanged. The per-step OSStatus diagnostics stay in the error message.Bumps
AppVersion.marketingto 3.0.4.🤖 Generated with Claude Code
https://claude.ai/code/session_01GMD3Q7bnJ9vJDdkaiuBN4Y
Generated by Claude Code