Bug 1666853

Summary: CC: unable to verify cert before import
Product: Red Hat Enterprise Linux 7 Reporter: Christina Fu <cfu>
Component: pki-coreAssignee: Alex Scheel <ascheel>
Status: CLOSED ERRATA QA Contact: Asha Akkiangady <aakkiang>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.7CC: ascheel, cpelland, dpunia, mharmsen
Target Milestone: rcKeywords: TestCaseProvided, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pki-core-10.5.16-2.el7 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1666859 1671245 (view as bug list) Environment:
Last Closed: 2019-08-06 13:07:21 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:    
Bug Blocks: 1666859, 1671245    

Description Christina Fu 2019-01-16 18:46:57 UTC
Description of problem:
As part of the Common Criteria evaluation, our evaluation testing lab, Gossamer, reported that the instruction we give in the guidance on using certutil does not meet the requirement.
The requirement is to NOT allow import of a cert until verified.

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


How reproducible:


Steps to Reproduce:
1. follow latest version of CC guidance Planning guide 
Chapter 13. Managing Certificate/Key Crypto Token

2. import using "certutil -A ..."
3. verify using "certutil -V ..."

Actual results:
The instruction itself breaks the requirement of "no import until verification".

Expected results:
instruction should be "verify and then import"

Additional info:
further discussion with Gossamer and Bob Relyea, we decided to write a shell script wrapper for certutil and adopt the two-token approach to achieve "verify first; import after".

Comment 3 Alex Scheel 2019-01-30 17:32:37 UTC
Commits: 

master: 8e22d591c41923a5291db486d2f697bd3d87d2cb
10.6: 0d4e2ca49f0f2496f9201a143cb05eea36c8ad7e
10.5: a187cccc269968e310d97eafc99771d2cd5b366e

    Add validate-then-import certificate utility

    The NSS utility certutil requires certificates to be imported
    (`certutil -A`) prior to validating their signatures and usage
    (`certutil -V -e`). PKICertImport avoids this pitfall by handling both
    import and validation in the same step, so if the validation fails, the
    certificate is removed. This ensures it is not accidentally used before
    it is verified.

    Signed-off-by: Alexander Scheel <ascheel>


master: f95e5fb5240e2c51caca28a92d5822dc3ee27408
10.6: c4168e0332f87931128a8fddc0398612333855c6
10.5: b85472cd6c33828c5d9bd7248291515687b5ca1f

    Add PKICertImport to pki

    Signed-off-by: Alexander Scheel <ascheel>

Comment 9 errata-xmlrpc 2019-08-06 13:07:21 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, 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/RHBA-2019:2228