Bug #6953

on mismatching private key for CA, "edit user" silently creates user cert using different CA

Added by Harald Linden over 4 years ago. Updated about 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
Affected Architecture:


Steps to reproduce:

  • have existing internal CA
  • import external CA (in my case, signed by the internal CA but generated externally)
  • enter wrong private key for CA and save (this should fail, btw.)
  • open dialogue "user manager" -> "edit user"
  • create user certificate

The resulting user cert will be signed by the existing internal CA instead of failing.

Starting this process from the cert manager works as expected and fails with "The following input errors were detected:
openssl library returns: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch".

Associated revisions

Revision 2cf5db21 (diff)
Added by Jim Pingle about 4 years ago

Ensure that the submitted private key matches the certificate or CA when importing. Ticket #6953

Revision 75e80f16 (diff)
Added by Jim Pingle about 4 years ago

If there are input errors when creating a user certificate from the user manager, stop and show the errors rather than appearing to fail silently. Fixes #6953


#1 Updated by Jim Pingle over 4 years ago

  • Assignee set to Jim Pingle

#2 Updated by Jim Pingle about 4 years ago

  • Category set to Certificates
  • Status changed from New to Feedback
  • Assignee changed from Jim Pingle to Harald Linden
  • Target version set to 2.4.0
  • % Done changed from 0 to 100

I was unable to reproduce the problem exactly as stated, but I added validation code to prevent incorrect keys from being accepted when importing a CA or Certificate. It checks the modulus of the certificate and the key to ensure they match before allowing the entry to be saved.

When I attempted to create a user certificate with the mismatched key, it failed but didn't show an error. I also pushed a change where it will stop and display errors if there were any encountered while creating the certificate.

#3 Updated by Jim Pingle about 4 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF