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

Don't pollute stderr in FIPS mode. BZ 1287610 #51

Merged
merged 1 commit into from
Oct 5, 2017

Conversation

dmnks
Copy link
Contributor

@dmnks dmnks commented Sep 14, 2017

When the system is in FIPS mode, certain unsecure checksum algorithms
such as md5 are disabled by hashlib and thus not available in yum. We
normally print an error during misc.py initialization for every such
algorithm, however that's just too annoying if it happens on every yum
run and is also confusing (as it doesn't say why the particular
algorithm is disabled).

Let's stop printing the message if the cause is FIPS mode and also
extend the message that is printed when yum actually tries to use such a
checksum algorithm (e.g. during repodata verification of a repo using
md5) so that it says it's due to FIPS.

Note: Custom FIPSNonCompliantError(MiscError) class is used instead of
just MiscError so that we can make the resulting message shorter in
YumRepository._checksum() without changing the message for any other
exceptions handled in that method.

When the system is in FIPS mode, certain unsecure checksum algorithms
such as md5 are disabled by hashlib and thus not available in yum.  We
normally print an error during misc.py initialization for every such
algorithm, however that's just too annoying if it happens on every yum
run and is also confusing (as it doesn't say why the particular
algorithm is disabled).

Let's stop printing the message if the cause is FIPS mode and also
extend the message that is printed when yum actually tries to use such a
checksum algorithm (e.g. during repodata verification of a repo using
md5) so that it says it's due to FIPS.

Note: Custom FIPSNonCompliantError(MiscError) class is used instead of
just MiscError so that we can make the resulting message shorter in
YumRepository._checksum() without changing the message for any other
exceptions handled in that method.
@megaumi megaumi merged commit 3294ac1 into rpm-software-management:master Oct 5, 2017
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.

None yet

2 participants