Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 608599

Summary: rpm doesn't understand SHA224 signature, but is possible to add sha224 signature
Product: Red Hat Enterprise Linux 6 Reporter: Jiri Kastner <jkastner>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED ERRATA QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: emaldona, mvadkert, pknirsch, sgrubb, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rpm-4.8.0-13.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1066494 (view as bug list) Environment:
Last Closed: 2011-05-19 14:19:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 608611    
Bug Blocks: 582655, 1066494    
Attachments:
Description Flags
patch solving 'Unknowk hash algorithm' output message
jkastner: review?
patch, which should be used, when nss will support SHA224 jkastner: review?

Description Jiri Kastner 2010-06-28 09:17:45 UTC
Created attachment 427357 [details]
patch solving 'Unknowk hash algorithm' output message

Description of problem:
rpm doesn't understand sha224, but is possible sign it with sha224 algorithm.

Version-Release number of selected component (if applicable):
rpm-4.8.0-9.el6

How reproducible:
always

Steps to Reproduce:
1. modify ".gnupg/gpg.conf" to have as first default value H11 (SHA224) in 'personal-digest-preferences' and 'default-preference-list' variables, or in "~/.rpmmacros" change %__gpg_sign_cmd to %{__gpg} --digest-algo sha224 --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
2. run "rpm -addsign some.rpm"
3. run "rpm -v --checksig some.rpm"
  
Actual results:
rpm -v --checksig mod_gnutls-0.5.6-1.md5.x86_64.rpm
mod_gnutls-0.5.6-1.md5.x86_64.rpm:
    Header V3 RSA/Unknown hash algorithm Signature, key ID c842f47e: BAD
    Header SHA1 digest: OK (2a30e68848f8aa15028e160164ce309c26b6f735)
    V3 RSA/MD5 Signature, key ID 40e6c3a4: OK
    V3 RSA/Unknown hash algorithm Signature, key ID c842f47e: BAD
    MD5 digest: OK (7b86a7c836b21679133b77ff7cdce95b)


Expected results:
rpm -v --checksig mod_gnutls-0.5.6-1.md5.x86_64.rpm
mod_gnutls-0.5.6-1.md5.x86_64.rpm:
    Header V3 RSA/SHA224 Signature, key ID c842f47e: OK
    Header SHA1 digest: OK (2a30e68848f8aa15028e160164ce309c26b6f735)
    V3 RSA/MD5 Signature, key ID 40e6c3a4: OK
    V3 RSA/SHA224 Signature, key ID c842f47e: OK
    MD5 digest: OK (7b86a7c836b21679133b77ff7cdce95b)


Additional info:

Comment 1 RHEL Program Management 2010-06-28 09:22:53 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 Jiri Kastner 2010-06-28 10:14:54 UTC
Created attachment 427373 [details]
patch, which should be used, when nss will support SHA224

HASH_AlgSHA224 must be provided by nss, unless this patch is useless

Comment 3 Panu Matilainen 2010-06-29 07:51:51 UTC
Ack for the first patch (applied upstream, thanks) and also for verifying the generated signature is something rpm's implementation (ie NSS) supports (some basic sanity tests added upstream now).

Comment 4 Elio Maldonado Batiz 2010-07-08 21:45:12 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=608611#c2

Comment 5 Jiri Kastner 2010-07-15 08:13:33 UTC
some progress in nss: https://bugzilla.mozilla.org/show_bug.cgi?id=356713

Comment 17 errata-xmlrpc 2011-05-19 14:19:36 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0739.html