Skip to content

fix: improve SecKeyGeneratePair implementation in PlayChain - #228

Merged
JoseMoreville merged 3 commits into
PlayCover:masterfrom
viatearz:fix/generate-key-pair
Aug 12, 2026
Merged

fix: improve SecKeyGeneratePair implementation in PlayChain#228
JoseMoreville merged 3 commits into
PlayCover:masterfrom
viatearz:fix/generate-key-pair

Conversation

@viatearz

Copy link
Copy Markdown
Contributor

Fixed several issues in PlayChain’s SecKeyGeneratePair implementation.
The changes are split into separate commits for clarity, they can be squashed.

First Issue
There is a mistake in the guard statement. The success check should be == 0, not != 0.

Second issue
It does not assign the generated keys to the out pointers, so the caller always receives null for both keys.

Third Issue
The app may place kSecAttrIsPermanent ("perm = 1") at the root-level of the parameter dictionary, instead of inside kSecPrivateKeyAttrs or kSecPublicKeyAttrs. PlayChain should handle this case as well.

@viatearz

Copy link
Copy Markdown
Contributor Author

Now we are able to log in with PlayChain enabled and SIP enabled.

screenshot

@TheMoonThatRises TheMoonThatRises added the enhancement New feature or request label Jul 21, 2026

@JoseMoreville JoseMoreville left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something i wanted to see at some point in the future, tahnks for working on it.

@JoseMoreville
JoseMoreville merged commit f932064 into PlayCover:master Aug 12, 2026
1 check passed
@viatearz
viatearz deleted the fix/generate-key-pair branch August 20, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants