搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How do I automate the import of a certificate (.cer) file within a silent install of FireFox 62.0.2?

  • 3 回覆
  • 2 有這個問題
  • 34 次檢視
  • 最近回覆由 Krishna234

more options

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

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

所有回覆 (3)

more options

Please only answer in this question as you created a duplicate.

more options

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
more options

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);
           }
       }
   }

}