Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-22302

Add its own return code for EEXISTS for getcert tool

    • certmonger-0.79.17-2.el9
    • Normal
    • 2
    • sst_idm_ipa
    • ssg_idm
    • 23
    • 25
    • 1
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • Yes
    • 2024-Q1-Bravo-S2, 2024-Q1-Bravo-S3
    • Enhancement
    • Hide
      .`getcert add-ca` returns a new return code if a certificate is already present or tracked

      With this update, the `getcert` command returns a specific return code, `2`, if you try to add or track a certificate that is already present or tracked. Previously, the command returned return code `1` on any error condition.
      Show
      .`getcert add-ca` returns a new return code if a certificate is already present or tracked With this update, the `getcert` command returns a specific return code, `2`, if you try to add or track a certificate that is already present or tracked. Previously, the command returned return code `1` on any error condition.
    • Done
    • None

      What were you trying to do that didn't work?

      If you try to add a CA or template with the getcert tool, it should have its own return code if the CA or template already exists. 

      With verbose output you get:

      org.fedorahosted.certmonger.duplicate: There is already a CA with the nickname "EARTH-Root-CA".

      It shouldn't be hard to map org.fedorahosted.certmonger.duplicate to an EEXISTS return code.

      Clone of upstream report https://www.pagure.io/certmonger/issue/269

      Please provide the package NVR for which bug is seen:

      certmonger-0.79.17-1

      Steps to reproduce

      1. getcert add-ca -c test -e /usr/bin/ls -v
      2. getcert add-ca -c test -e /usr/bin/ls -v
      3. echo $?

      Expected results

      A unique exit value

      Actual results

      1

            rhn-engineering-rcrit Rob Crittenden
            rhn-engineering-rcrit Rob Crittenden
            Rob Crittenden Rob Crittenden
            Michal Polovka Michal Polovka
            Filip Hanzelka Filip Hanzelka
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: