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 1671044 - CRMFPopClient displays/save negative private key id
Summary: CRMFPopClient displays/save negative private key id
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pki-core
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: RHCS Maintainers
QA Contact: Asha Akkiangady
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-30 16:04 UTC by Geetika Kapoor
Modified: 2023-09-14 04:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-15 19:00:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure dogtagpki issue 3142 0 None None None 2020-03-15 19:00:11 UTC
Github dogtagpki pki issues 3259 0 None open CRMFPopClient displays/save negative private key id 2020-10-04 21:47:20 UTC

Description Geetika Kapoor 2019-01-30 16:04:00 UTC
Description of problem:

Here , CRMFPopClient displays  negative keyid and in the file also it adds negative keyid.


[root@master test]# CRMFPopClient -d abc -p Secret123 -n "uid=test10200,cn=test10200" -a ec -c nistp256 -o Democrmf1.b64 -t false -y true
Keypair private key id: -25065582f755a4a799ecfa6e6d1c0b81a9cd1e9d
CRMFPopClient: use_shared_secret true. Generating SubjectKeyIdentifier extension.
CryptoUtil: createKeyIdentifier: begins
Storing CRMF request into Democrmf1.b64
Storing CRMF request key id into Democrmf1.b64.keyId


[root@master test]#  certutil -K -d /tmp/test/abc
certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key and Certificate Services"
Enter Password or Pin for "NSS Certificate DB":
< 0> ec       daf9aa7d08aa5b586613059192e3f47e5632e163   (orphan)


[root@master test]# cat Democrmf1.b64.keyId
-25065582f755a4a799ecfa6e6d1c0b81a9cd1e9d

Version-Release number of selected component (if applicable):
pki --version
PKI Command-Line Interface 10.5.9-10.el7_6

How reproducible:

always

Steps to Reproduce:
1.Run CRMFPopClient and see when it generates negative keyid.
2.
3.

Actual results:


Expected results:

Expecting same value of key id in nssdb and the printed one.
Additional info:

Comment 2 Alex Scheel 2020-03-15 18:58:56 UTC
Sneha, could we get this get re-tested?

I think this might've been fixed in JSS a while back:


commit 26dd32546a10fd2e86d8102385be3df5de198cde
Author: Alexander Scheel <ascheel>
Date:   Fri Mar 29 15:01:48 2019 -0400

    Return positive BigIntegers
    
    Several of the usages of BigIntegers lead to the potential of negative
    numbers, though only positive numbers should be returned.
    
    PK11RSAPublicKey's getModulus() and getPublicExponent() methods can
    potentially return negative values, when both the modulus and exponent
    should be strictly positive.
    
    PK11PrivKey's getDSAParams() could return negative values depending on
    the PQG parameters.
    
    The Key Identifiers printed by tests.CloseDBs should be positive (as
    they're UIDs) but could be displayed as negative values; the same
    happens in crmf.CertReqMsg.
    
    Signed-off-by: Alexander Scheel <ascheel>

Comment 4 Red Hat Bugzilla 2023-09-14 04:45:59 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.