on mismatching private key for CA, "edit user" silently creates user cert using different CA
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".
Ensure that the submitted private key matches the certificate or CA when importing. Ticket #6953
#2 Updated by Jim Pingle 4 months 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.