Skip to content

v3.0.4: Import the private key via SecItemImport (ad-hoc builds lack keychain entitlements) - #5

Merged
Mac2100 merged 1 commit into
mainfrom
claude/portside-v3-macos-d9zdew
Jul 30, 2026
Merged

v3.0.4: Import the private key via SecItemImport (ad-hoc builds lack keychain entitlements)#5
Mac2100 merged 1 commit into
mainfrom
claude/portside-v3-macos-d9zdew

Conversation

@Mac2100

@Mac2100 Mac2100 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

The v3.0.3 diagnostics pinpointed the client-identity failure: key: -34018 (errSecMissingEntitlement). SecItemAdd for 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 SecItemImport API, which has no entitlement requirement and grants this app ACL access to the key. SecIdentityCreateWithCertificate then 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 (-25299 duplicate) and is unchanged. The per-step OSStatus diagnostics stay in the error message.

Bumps AppVersion.marketing to 3.0.4.


🤖 Generated with Claude Code

https://claude.ai/code/session_01GMD3Q7bnJ9vJDdkaiuBN4Y


Generated by Claude Code

…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
@Mac2100
Mac2100 merged commit f8676ec into main Jul 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants