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 1584550 - CRMFPopClient: unexpected behavior with -y option when values are specified
Summary: CRMFPopClient: unexpected behavior with -y option when values are specified
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pki-core
Version: 8.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: RHCS Maintainers
QA Contact: Asha Akkiangady
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-31 07:56 UTC by Geetika Kapoor
Modified: 2021-05-18 15:25 UTC (History)
5 users (show)

Fixed In Version: pki-core-10.6-8040020210114180044.d4d99205
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:25:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:
cpinjani: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab dogtagpki/pki/-/blob/master/tests/dogtag/pytest-ansible/pytest/ca/bugzilla/test_bug_1590942_1584550.py 0 None None None 2021-01-18 11:24:12 UTC

Description Geetika Kapoor 2018-05-31 07:56:49 UTC
Description of problem:

CRMFPopClient help says :

  -y <true|false>              Add SubjectKeyIdentifier extension in case of self-signed CMC requests (default: false)
                               - true: enabled
                               - false: disabled


CRMFPopClient generates SKID for any value supplied to -y.
Even if -y is false, it generates the SKID.


Example:

Test Case 1:
------------
# CRMFPopClient -d /opt/pkitest/certdb -q POP_SUCCESS -p SECret.123 -o /tmp/cmc_request.csr -n CN=Testing,UID=TEsTinG,O=Test Certificate -y noskidneeded -h internal
Keypair private key id: 70ed4733417994b2a09c9244a365ef27b111de9f
CRMFPopClient: self_sign true. Generating SubjectKeyIdentifier extension.
CryptoUtil: createKeyIdentifier: begins
Storing CRMF requrest into /tmp/cmc_request.csr


## Decode the csr and check for skid.

 378   29:         [9] {
 380   27:           SEQUENCE {
 382    3:             OBJECT IDENTIFIER subjectKeyIdentifier (2 5 29 14)
 387   20:             OCTET STRING
         :               4C 21 2D F1 78 47 BA B1 B3 BF E6 EB 17 3B C2 25
         :               6D F4 D9 0D
         :             }
         :           }
         :         }


Test Case 2:
------------

# CRMFPopClient -d /opt/pkitest/certdb -q POP_SUCCESS -p SECret.123 -o /tmp/cmc_request.csr -n CN=Testing,UID=TEsTinG,O=Test Certificate -y false -h internal
Keypair private key id: 6e7fa47f78f81249b934a9b3c046307115acf9c9
CRMFPopClient: self_sign true. Generating SubjectKeyIdentifier extension.
CryptoUtil: createKeyIdentifier: begins
Storing CRMF requrest into /tmp/cmc_request.csr

Version-Release number of selected component (if applicable):

10.5

How reproducible:

always
Steps to Reproduce:
1.send a CRMFPopClient request with -y option with a value != true.It can be false as well.
2.
3.

Actual results:


Expected results:

Based on CRMFPopClient help output.
1. It should not accept any other value other than true and false.
2. when -y is false then also it should not generate skid.

Additional info:

Comment 2 Matthew Harmsen 2018-07-04 00:41:52 UTC
Moved to RHEL 7.7.

Comment 3 Christina Fu 2020-03-03 01:29:07 UTC
I think this option has since been changed to the following
  -y <true|false>              Add SubjectKeyIdentifier extension in case of CMC SharedSecret requests (default: false); To be used with 'request.useSharedSecret=true' when running CMCRequest.
                               - true: enabled
                               - false: disabled

However, looking at the code of CRMFPopClient.java, it says:

        boolean use_shared_secret = cmd.hasOption("y");
That means it's not taking "true" or "false"; It's determined by the presence of "-y".
I think the Usage text error that needs to be fixed.

Comment 9 Alex Scheel 2021-01-07 16:33:38 UTC
Pull request:
https://github.com/dogtagpki/pki/pull/3422

Comment 10 Alex Scheel 2021-01-11 17:18:46 UTC
Checked in v10.10:

commit ef8ee5f9dd2db0458be5b6372dba05322aae3912
Author: Alexander Scheel <ascheel>
Date:   Thu Jan 7 11:31:26 2021 -0500

    Update usage for CRMFPopClient -y option
    
    Signed-off-by: Alexander Scheel <ascheel>


Checked in master:

commit d9025c13333ff4010f9ee850a3034349e03481f4
Author: Alexander Scheel <ascheel>
Date:   Thu Jan 7 11:31:26 2021 -0500

    Update usage for CRMFPopClient -y option
    
    Signed-off-by: Alexander Scheel <ascheel>

Comment 13 shalini 2021-01-20 08:07:40 UTC
BZ verified on latests bits from RHCS repo (We did pre-verification from rhcs repo because the bits were not there in development compose and we do not want to delay Verification):
 pki-ca                            noarch  10.10.3-1.module+el8pki+9457+b4dcf7f7         RHEL8.4-CERTSYS    1.0 M
 pki-kra                           noarch  10.10.3-1.module+el8pki+9457+b4dcf7f7         RHEL8.4-CERTSYS    201 k
 pki-server                        noarch  10.10.3-1.module+el8pki+9457+b4dcf7f7


Successful pipeline : https://gitlab.cee.redhat.com/skhandel/pki-pytest-ansible/-/jobs/2776695

Marking the BZ verified-tested

Comment 20 errata-xmlrpc 2021-05-18 15:25:13 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 (Moderate: pki-core:10.6 and pki-deps:10.6 security, bug fix, and enhancement update), 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/RHSA-2021:1775


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