how to Add Certificate programmatically into Firefox version 59, Cannot find cert9.db in firefox folder
Good day.
I have our own Certificate Authority (CA) that we need to add to Mozilla Firefox Browser, as ive researched that Firefox has its own certificate management.
But we need to add it programmatically, as we have our own .net application that automatically adds our certificates to IE, Edge and Chrome for our clients.
I have used Firefox version 59. Since i don't have experience on creating a code on doing this, i looked around and came across a solution. but it didn't work with either our .cer or pem certificates.
https://github.com/christian-korneck/firefox_add-certs - i think this will only work with Firefox 39.
I found another article, which has several solutions. and towards the end someone says from Firefox 58, it only uses cert9.db
https://stackoverflow.com/questions/1435000/programmatically-install-certificate-into-mozilla
But i cannot find any cert8.db or cert9.db on the firefox folders. Even if i add my certificate manually. there is no profile folder generated.
I am not stuck in this problem. I hope anyone can give me an accurate working code solution for windows ( either through a command script , batch file or a powershell script), that i can add our certificate to Firefox 59 certificate store.
Thanks for your help and support,
Rommel
تمام جوابات (3)
hi, i think you're looking in the wrong place for your firefox profile - this is user-specific and not placed in the installation directory: Profiles - Where Firefox stores your bookmarks, passwords and other user data
however there are also different ways to go about achieving what you're looking for - please refer to https://wiki.mozilla.org/CA:AddRootToFirefox
Also note that Firefox has a preference that can be set that to read CAs from the Windows certificate store.
The preference is:
security.enterprise_roots.enabled
You can add it via about:config (Add boolean) and set it to true.
If that works, you can also set it via Group Policy starting in Firefox 60.
Were you able to use this preference?