so seems It’s the crypto-policy disallowing SHA-1 and just running sudo update-crypto-policies --set DEFAULT:SHA1 or sudo update-crypto-policies --set LEGACY fixes the problem.
now, how we query the rpm key rpm -qa --qf "%{name}-%{version}-%{release}.%{arch} %|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{(none)}|}|\n"
if we grep by key id or by SHA1 we will find the packages with weak sign
then some of your packages are affected. You can use the number you see at the end of each such error (in this case 2525) to figure out which package it is:
This update problem is still persisting with a strange error output that does not respond to the fixes above. The rpm -qa > /dev/null number shows as 3544, however, it is not readable using the
rpm -q --nosignature --querybynumber 3544.
So I am not able to determine the installed package that is causing the error.
Please help!
[root@HP ~]# rpm -qa /dev/null
error: rpmdbNextIterator: skipping h# 3544
Header V4 RSA/SHA256 Signature, key ID eb10b464: BAD
Header SHA256 digest: BAD (Expected f26082589e9cc0fb53757776b401e73522abcdda043985c0665312541f3a769a != 2719577d68032b65c42d7c32a068e4b059e02f8541ce5d1b52ad9b2bac2c082b)
Header SHA1 digest: BAD (Expected bc4c1c2acce452711916b278f592770b759f6f7b != af5120f5268e045941dd20e0faa8949fbcbeb4c0)
rpm -q --nosignature --querybynumber 3544
error: rpmdbNextIterator: skipping h# 3544
Header SHA256 digest: BAD (Expected f26082589e9cc0fb53757776b401e73522abcdda043985c0665312541f3a769a != 2719577d68032b65c42d7c32a068e4b059e02f8541ce5d1b52ad9b2bac2c082b)
Header SHA1 digest: BAD (Expected bc4c1c2acce452711916b278f592770b759f6f7b != af5120f5268e045941dd20e0faa8949fbcbeb4c0)
error: record 3544 could not be read