Skip to content

Handle ECDSA algorithm alternate name from parseKeyPair - #81

Merged
beakthoven merged 1 commit into
beakthoven:mainfrom
TheFreeman193:fix-ec-rsa-selection
Aug 24, 2026
Merged

Handle ECDSA algorithm alternate name from parseKeyPair#81
beakthoven merged 1 commit into
beakthoven:mainfrom
TheFreeman193:fix-ec-rsa-selection

Conversation

@TheFreeman193

@TheFreeman193 TheFreeman193 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

After observing the behaviour where the RSA chain is selected despite requesting an ECDSA cert, I added some logging lines to follow the algorithm naming from the XML keybox parsing in KeyBoxUtils.kt.

This revealed that CertificateUtils.parseKeyPair() returns ECDSA in some cases, not EC.

This change therefore adds a when clause to cover this possibility.

After building locally with Android Studio and testing on devices running LineageOS 22.2/A15 and 23.2/A16, I'm now seeing the correct chains when RSA is toggled on/off in Key Attestation Demo.

Closes #78

@beakthoven

Copy link
Copy Markdown
Owner

Perhaps related to #78 ?

@TheFreeman193

Copy link
Copy Markdown
Contributor Author

Perhaps related to #78 ?

Possibly - I have asked him to test with the CI build for this PR.

@gavdoc38

Copy link
Copy Markdown

Thanks @TheFreeman193 - as I've mentioned in my original issue that PR fixed it all 😃

@beakthoven beakthoven left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the PR!

@beakthoven
beakthoven merged commit 9096730 into beakthoven:main Aug 24, 2026
2 checks passed
@TheFreeman193
TheFreeman193 deleted the fix-ec-rsa-selection branch August 24, 2026 18:27
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.

Failure to generate full EC chain (RSA fine)

3 participants