How do I automate the import of a certificate (.cer) file within a silent install of FireFox 62.0.2?
We are migrating from firefox Version 61 to Version 62. after sucessfull installation i am seeing an error your connection is not secure. If i import the certification manually and if the launch the firefox it works as expected and i am able to launch all the websites.
I have tried to copy the files(cert9.db and key4.db) from my profile to others. It is not working for others.
But if i manually import it works for them.
Is there any way i can silently automate them to import?
Thanks
Tutte le risposte (3)
Please only answer in this question as you created a duplicate.
You can set this pref to true on the about:config page in cases where root certificates were added to the Windows certificate store.
- security.enterprise_roots.enabled = true
I have changed this configuration security.enterprise_roots.enabled = true
Still i am seeing the error. But one thing i have once if Preload the certificate databases to user profile it is working..
Is there any method to auto copy these Preload the certificate databases to users profile after profile creating..
I am using the below script. But still it is not copying the files.
// If cert9.db isn't there, it's a new profile if (!certDBFile.exists()) {
var defaultProfileDir = Services.dirsvc.get("GreD", Ci.nsIFile); defaultProfileDir.append("defaults"); defaultProfileDir.append("profile"); try { copyDir(defaultProfileDir, profileDir); } catch (e) { Components.utils.reportError(e); }
}else { //if cert9.db is less than 140kb, its a new one without the
bank cert copy this one over if(certDBFile.fileSize<140000 ){ var defaultProfileDir = Services.dirsvc.get("GreD",
Ci.nsIFile); defaultProfileDir.append("defaults"); defaultProfileDir.append("profile"); try {
copyDir(defaultProfileDir, profileDir);
} catch (e) {
Components.utils.reportError(e);
} }
}
function copyDir(aOriginal, aDestination) {
var enumerator = aOriginal.directoryEntries; while (enumerator.hasMoreElements()) { var file = enumerator.getNext().QueryInterface
(Components.interfaces.nsIFile);
if (file.isDirectory()) { var subdir = aDestination.clone(); subdir.append(file.leafName); try { subdir.create(Ci.nsIFile.DIRECTORY_TYPE,
FileUtils.PERMS_DIRECTORY);
copyDir(file, subdir); } catch (e) { Components.utils.reportError(e); } } else { try { file.copyTo(aDestination, null); } catch (e) { Components.utils.reportError(e); } } }
}