No visible failure report when importing PKCS12 cert into People tab in Certificate manager
Categories
(Core :: Security: PSM, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox65 | --- | affected |
People
(Reporter: aceman, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [psm-backlog])
Comment 1•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•5 years ago
|
||
Oops, it just happened again, I was in the wrong tab an importing my personal certificate silently failed. This is in the console:
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIX509CertDB.importCertsFromFile]
Could the priority on this be raised? This wouldn't be hard to fix? Add try/catch and show an error? Like "Import of certificate failed. Make sure you are importing into the correct category". Or what are other reasons for failure?
Comment 6•5 years ago
|
||
I know it's disappointing to hear this about a feature you use, but this is not a priority right now. That said, I think this is something we'd welcome a patch for.
Comment 7•5 years ago
|
||
OK, so can you describe the shape of the solution? Add try/catch and show an error? Or is there more to it?
Comment 8•5 years ago
|
||
Yeah, probably try/catch with alert.
Comment 9•5 years ago
|
||
Changing this in addCACerts()
- certdb.importCertsFromFile(fp.file, Ci.nsIX509Cert.CA_CERT);
- caTreeView.loadCerts(Ci.nsIX509Cert.CA_CERT);
- caTreeView.selection.clearSelection();
+ try {
+ certdb.importCertsFromFile(fp.file, Ci.nsIX509Cert.CA_CERT);
+ caTreeView.loadCerts(Ci.nsIX509Cert.CA_CERT);
+ caTreeView.selection.clearSelection();
+ } catch (ex) {
+ promptError(ex);
+ }
gives an "The PKCS #12 operation failed for unknown reasons" alert. Better then nothing. But trying to import a CA cert which already exists gives "This certificate is already installed as a certificate authority" from here
https://searchfox.org/mozilla-central/rev/2e355fa82aaa87e8424a9927c8136be184eeb6c7/security/manager/ssl/nsNSSCertificateDB.cpp#310
now followed by the "unknown reason" error. So that's not the correct fix.
I wonder why
https://searchfox.org/mozilla-central/rev/2e355fa82aaa87e8424a9927c8136be184eeb6c7/security/manager/ssl/nsNSSCertificateDB.cpp#305
doesn't trigger.
Updated•2 years ago
|
Description
•