Skip to content

fix: improve SecKeyGeneratePair implementation in PlayChain#228

Open
viatearz wants to merge 3 commits into
PlayCover:masterfrom
viatearz:fix/generate-key-pair
Open

fix: improve SecKeyGeneratePair implementation in PlayChain#228
viatearz wants to merge 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

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.

1 participant