Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script for Install SSL Certificate on Trusted Root Certificate Store

I want to install self-signed certificate for IE, Firefox and Chrome in Windows (XP and 7).

I need to install certificate for several systems, So I planed to create .bat file that install certificate for browsers. I got following command while googled

certutil -addstore -f -enterprise -user root root_ca.cer

But it only for IE. Is there any option for Chrome and Firefox.

like image 871
Kumar Avatar asked Dec 27 '12 09:12

Kumar


People also ask

How do I install SSL certificate in Trusted Root Certification Authorities store?

Navigate to Certificates (Local Computer); choose the Trusted Root Certification Authorities store to import the certificate; right click the store and choose All Tasks > Import ; Follow the wizard and provide the certificate file you have.


1 Answers

Bit of an old post but thought I would throw in my two cents anyway. You are right, that command in a batch script will install the certificate root_ca.cer into the trusted CA store. I would modify the line to be:

certutil -addstore -f -enterprise -user root "%~dp0root_ca.cer"

This way the shell will expand %~dp0 to the path of the executing script so you can run it across a network from a UNC path and it will still work.

In answer to your other question, Chrome will (as of writing this post) read from the windows certificate store so there is no need to do anything special; just restart chrome after running the script and it should be sweet.

As for Mozilla check out this post for a script to do that. Simples!

like image 189
Katstevens Avatar answered Sep 19 '22 01:09

Katstevens