Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix password transformation for characters with char codes greater than 255 #412

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

microshine
Copy link
Contributor

This pull request fixes an issue where the password transformation did not support characters with char codes greater than 255. The previous implementation used a null-terminated UCS-2 encoded string, which caused incorrect transformation for such characters. This PR updates the password transformation to correctly handle characters with char codes greater than 255 by using a byte array and encoding the password as UTF-8.

@microshine microshine linked an issue Jul 15, 2024 that may be closed by this pull request
@coveralls
Copy link

Coverage Status

coverage: 74.361% (+0.02%) from 74.346%
when pulling 2dcf442 on fix-pfx-pass-utf8
into 0e6e280 on master.

@microshine microshine merged commit 6d49deb into master Jul 15, 2024
11 checks passed
@microshine microshine deleted the fix-pfx-pass-utf8 branch July 15, 2024 13:06
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UTF-8 chars in password break PKCS #12
2 participants