Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Password fixes #94

Merged
merged 3 commits into from
Aug 30, 2022
Merged

Password fixes #94

merged 3 commits into from
Aug 30, 2022

Conversation

vathpela
Copy link
Contributor

This fixes two problems I've had related to reading PINs while diagnosing https://bugzilla.redhat.com/show_bug.cgi?id=2122777 .

GCC added and then later removed the diagnostic flag
"-Wanalyzer-use-of-uninitialized-value", and so this doesn't work with
newer versions of GCC.

This patch removes the previous workaround for when it didn't work well.
I really wish any of our compilers had any sense of rigor with this
stuff at all.

Signed-off-by: Peter Jones <[email protected]>
Right now, we have a few callback functions for PK11_Authenticate(), and
they take different arguments.  This is incorrect; none of the callers
ever pass anything through except our CMS context.

This fixes get_password_passthrough() to correctly accept the CMS
context and get the passthrough data from cms->pwdata instead of trying
to treat the CMS context as the pwdata.

Related: rhbz#2122777

Signed-off-by: Peter Jones <[email protected]>
Right now, when we read the password/PIN from a file, we're pruning the
end of the string from the file we read indiscriminately.  If you don't
have a newline, that means we're cutting off the final digits of the
text.

This changes it to prune only common special characters from the
pinfile, but also to prune /all/ of them.

Related: rhbz#2122777
Signed-off-by: Peter Jones <[email protected]>
@frozencemetery frozencemetery merged commit 389ef88 into rhboot:main Aug 30, 2022
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