Skip to content

Commit

Permalink
Lower _pkgverify_level to signature for signature checking with rpmkeys
Browse files Browse the repository at this point in the history
We don't want to be veryfing digests as well when checking signatures.
It would break legacy package installation in FIPS mode due to MD5
digest being unverifiable (see https://access.redhat.com/solutions/5221661)

Follow up for #1753
  • Loading branch information
kontura authored and pkratoch committed Nov 8, 2021
1 parent 9798e9e commit 185330e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dnf/rpm/miscutils.py
Expand Up @@ -66,11 +66,10 @@ def _verifyPackageUsingRpmkeys(package, installroot):
_logger.critical(_('Cannot find rpmkeys executable to verify signatures.'))
return 2

# "--define=_pkgverify_level all" enforces signature checking;
# "--define=_pkgverify_flags 0x0" ensures that all signatures and digests
# are checked.
# "--define=_pkgverify_level signature" enforces signature checking;
# "--define=_pkgverify_flags 0x0" ensures that all signatures are checked.
args = ('rpmkeys', '--checksig', '--root', installroot, '--verbose',
'--define=_pkgverify_level all', '--define=_pkgverify_flags 0x0',
'--define=_pkgverify_level signature', '--define=_pkgverify_flags 0x0',
'-')
with subprocess.Popen(
args=args,
Expand Down

0 comments on commit 185330e

Please sign in to comment.