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.
DescriptionAsha Akkiangady
2018-06-22 20:36:54 UTC
Description of problem:
Currently pki client-cert-import doesn't support HSM token.
Version-Release number of selected component (if applicable):
pki-tools-10.5.1-13.1.el7_5.x86_64
How reproducible:
Steps to Reproduce:
1. Using PKCS10Client create a CSR using HSM token.
2. Approve the certificate using CMC method. Base 64 encoded certificate is stored in /opt/rhqa_pki/ca_IssuanceProtectionSystemCert.pem
3.
# pki -vvvv -d /var/lib/pki/rhcs93-ECC-CA-aakkiang-nocp11/alias -c SECret.579 --token NHSM6000-OCS client-cert-import "IssuanceProtectionSystemCert" --cert /opt/rhqa_pki/ca_IssuanceProtectionSystemCert.pem
Server URI: http://nocp11.idm.lab.eng.rdu2.redhat.com:8080
Client security database: /var/lib/pki/rhcs93-ECC-CA-aakkiang-nocp11/alias
Message format: null
Command: client-cert-import IssuanceProtectionSystemCert --cert /opt/rhqa_pki/ca_IssuanceProtectionSystemCert.pem
Module: client
Module: cert-import
Importing certificate from /opt/rhqa_pki/ca_IssuanceProtectionSystemCert.pem.
External command: /bin/certutil -A -d /var/lib/pki/rhcs93-ECC-CA-aakkiang-nocp11/alias -f /tmp/pki-client-cert-import-899064207899981979.nssdb-pwd -i /opt/rhqa_pki/ca_IssuanceProtectionSystemCert.pem -n IssuanceProtectionSystemCert -t u,u,u
java.lang.Exception: Unable to import certificate file
at com.netscape.cmstools.client.ClientCertImportCLI.importCert(ClientCertImportCLI.java:351)
at com.netscape.cmstools.client.ClientCertImportCLI.execute(ClientCertImportCLI.java:171)
at com.netscape.cmstools.cli.CLI.execute(CLI.java:345)
at com.netscape.cmstools.cli.CLI.execute(CLI.java:345)
at com.netscape.cmstools.cli.MainCLI.execute(MainCLI.java:633)
at com.netscape.cmstools.cli.MainCLI.main(MainCLI.java:669)
Caused by: com.netscape.cmstools.cli.CLIException: External command failed. RC: 255
at com.netscape.cmstools.cli.CLI.runExternal(CLI.java:386)
at com.netscape.cmstools.cli.CLI.runExternal(CLI.java:358)
at com.netscape.cmstools.client.ClientCertImportCLI.importCert(ClientCertImportCLI.java:349)
... 5 more
Actual results:
client-cert-import fails.
Expected results:
Certificate should be imported successfully.
Additional info: