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 1532867

Summary: Inconsistent key ID encoding (RHEL)
Product: Red Hat Enterprise Linux 7 Reporter: Matthew Harmsen <mharmsen>
Component: pki-coreAssignee: Endi Sukma Dewata <edewata>
Status: CLOSED ERRATA QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: enewland, rpattath
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pki-core-10.5.1-9.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
: 1546933 (view as bug list) Environment:
Last Closed: 2018-04-10 17:02:54 UTC Type: Bug
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:    
Bug Blocks: 1546933    

Description Matthew Harmsen 2018-01-09 22:53:47 UTC
Key IDs are displayed as unsigned hex numbers by certutil:

    $ certutil -K -d /var/lib/pki/pki-tomcat/alias/ -f password.txt
    certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key and Certificate Services"
    < 0> rsa      7c2dd8cd2213494ab6e26e70fde332669f17f913   ca_ocsp_signing
    < 1> rsa      e91f694a9e7c753cd7aa533cf5f6195d26523ee0   NSS Certificate DB:sslserver
    < 2> rsa      446ed35d7e811e7f73d0d1f220afc60083deba74   ca_signing
    < 3> rsa      34488253ad5443552b89c4087b4e36e6d212ba17   subsystem
    < 4> rsa      b60333e92c6d9643b6e41407fa1557e54a442e35   ca_audit_signing

However, the key IDs are stored as signed hex numbers in CS.cfg:

    cloning.audit_signing.privkey.id=-49fccc16d39269bc491bebf805eaa81ab5bbd1cb
    cloning.ocsp_signing.privkey.id=7c2dd8cd2213494ab6e26e70fde332669f17f913
    cloning.signing.privkey.id=446ed35d7e811e7f73d0d1f220afc60083deba74
    cloning.subsystem.privkey.id=34488253ad5443552b89c4087b4e36e6d212ba17

Also, PKI is always treating the key ID as signed hex numbers in various locations.

Depending on the value, sometimes they may not match and may lead to confusions or other problems.

To avoid potential problems, they should be treated consistently as unsigned hex numbers.

Comment 2 Matthew Harmsen 2018-01-18 19:53:57 UTC
Per PKI Team Meeting of 20180118 moving to RHEL 7.6.

NOTE:  As we cannot control the creation of IDs, we request that anyone
       encountering this bug provide a db with an offending key starting
       with a '0' so that we may adequately fix this issue.

Comment 8 Roshni 2018-02-22 19:48:55 UTC
[root@nocp1 ~]# rpm -qi pki-ca
Name        : pki-ca
Version     : 10.5.1
Release     : 9.el7
Architecture: noarch
Install Date: Tue 20 Feb 2018 01:41:57 PM EST
Group       : System Environment/Daemons
Size        : 2359944
License     : GPLv2
Signature   : (none)
Source RPM  : pki-core-10.5.1-9.el7.src.rpm
Build Date  : Mon 19 Feb 2018 11:31:00 PM EST
Build Host  : ppc-034.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://pki.fedoraproject.org/
Summary     : Certificate System - Certificate Authority

Performed the following sanity tests:

1. Smartcard token enrollment with server side key generation.
2. Key recovery using external registration.

Comment 10 errata-xmlrpc 2018-04-10 17:02:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0925