#2977 Cert import failing with NSS SQL database
Closed: fixed Opened by edewata.

There seems to be a bug in NSS that affects importing a cert into NSS SQL database (i.e. Fedora 28). The problem may affect pki pkcs12-import tool which is used for various things such as replication setup. When the bug is fixed in NSS, the dependency in PKI/JSS needs to be updated.

$ pki pkcs12-import ...
org.mozilla.jss.crypto.NoSuchItemOnTokenException: Expected user cert but no matching key?: (-8157) Certificate extension not found.
        at org.mozilla.jss.CryptoManager.importCertPackageNative(Native Method)
        at org.mozilla.jss.CryptoManager.importUserCACertPackage(CryptoManager.java:1151)
        at netscape.security.pkcs.PKCS12Util.storeCertIntoNSS(PKCS12Util.java:891)
        at netscape.security.pkcs.PKCS12Util.storeCertIntoNSS(PKCS12Util.java:907)
        at com.netscape.cmstools.pkcs12.PKCS12ImportCLI.execute(PKCS12ImportCLI.java:127)
        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:705)
        at com.netscape.cmstools.cli.MainCLI.main(MainCLI.java:741)

See also:

  • https://bugzilla.mozilla.org/show_bug.cgi?id=1429591
  • https://bugzilla.redhat.com/show_bug.cgi?id=1532188
  • https://pagure.io/certmonger/c/063394def26533067591a9fa02be5cfbcf95064d?branch=master
  • https://bugzilla.redhat.com/show_bug.cgi?id=1561730
  • https://bugzilla.redhat.com/show_bug.cgi?id=1568271

Metadata Update from @mharmsen:
- Custom field component adjusted to None
- Custom field feature adjusted to None
- Custom field origin adjusted to None
- Custom field proposedmilestone adjusted to None
- Custom field proposedpriority adjusted to None
- Custom field reviewer adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None
- Issue set to the milestone: 0.0 NEEDS_TRIAGE

Fixed PKI part of the issue in master branch:

  • https://github.com/dogtagpki/pki/commit/dcbf383737ed1856641c2f59c1faa15ff1c2c45c

The NSS part of the issue has not been fixed yet, but IPA has a workaround.

Metadata Update from @edewata:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata Update from @edewata:
- Issue set to the milestone: 10.6.1 (was: 0.0 NEEDS_TRIAGE)

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/3095

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata