Bug 1144186
Summary: | Cannot delete orphan private keys with certutil. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | William Brown <william> |
Component: | nss | Assignee: | Daiki Ueno <dueno> |
Status: | CLOSED ERRATA | QA Contact: | Ivan Nikolchev <inikolch> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 7.2 | CC: | dstoykov, dueno, edewata, hkario, inikolch, julius.schwartzenberg, peljasz, rc556677, tscherf, yuri |
Target Milestone: | rc | Keywords: | Reopened, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | nss-3.43.0-2.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-08-06 13:08:26 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1645231 | ||
Bug Blocks: |
Description
William Brown
2014-09-18 23:14:34 UTC
yes, me too. +1 NSS management utils are hell. There seems to be an upstream bug for the same problem as well: https://bugzilla.mozilla.org/show_bug.cgi?id=291383 I realize that NSS provides an utility that might be useful for this purpose: symkeyutil We ship it as part of the nss-tools package. It's in the unsupported directory, because we don't have documentation for it etc. However, you should be able execute it directly using its full path: /usr/lib64/nss/unsupported-tools/symkeyutil Use parameter -H for help It seems that an orphan key (no nickname) can be deleted using symkeyutil -D -i <id-printed-by-certutil> Does that work for you? I take that back. The keys you're talking about aren't symmetric keys. This persists in 3.38 with a bizarre workaround: now you can adopt an orphan key using -R and hexadecimal. ## specify the key by nickname but will fallback to checking hexadecimal certutil -R -k 0x788a94edbeb030b97cdbc7cc401dc31cea20e69b -a -s CN=adoptkey (The 0x is optional). For some reason -R tests for hex id in -k, but -F does not test for hex id in -n. Then you can generate a self-signed cert form the CSR -> inject the cert -> delete both cert/key This does not work if your orphan key is ec. Then the R -k <hex-id> trick doesn't work. NSS management utils are still hell. Just a follow-up note on EC keys: the reason the adopt-a-key drive fails on EC keys is a limitation in nss-softokn nss-softokn-freebl In order to generate the CSR from the orphan key, certutil attempts to extract the attribute CKA_EC_POINT from the ec orphan key. Not all PKCS11 modules implement this and softokn is sadly one of them (<-- this attribute is not required by the standard). AWS CloudHSM/SafeNet Luna is an example where this would work as they provide CKA_EC_POINT in the CKO_PRIVATE_KEY of EC type. This issue was not selected to be included either in Red Hat Enterprise Linux 7.7 because it is seen either as low or moderate impact to a small amount of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise we recommend moving the request to Red Hat Enterprise Linux 8 if applicable. 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, 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-2019:2237 |