Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to modify the VSCode certificate store to add certificates?

Currently, the only way to use VSCode get around a corporate firewall that requires company CA certificates is to set "http.proxyStrictSSL = false" in the config. This is a no-go for me at work. I know that VSCode uses the Chromium networking stack, so there is a way to modify the certificate store when building VSCode (as stated here: Getting Chrome to accept self-signed localhost certificate, for example)?

like image 564
aspaltv Avatar asked Dec 15 '18 14:12

aspaltv


1 Answers

According to https://code.visualstudio.com/docs/setup/network, the solution is to edit the system certificate store:

Since Chromium uses the OS's certificate trust infrastructure, the preferred option is to add your proxy's certificate to your OS's trust chain.

This means that your answer is OS-dependent:

  • Windows: Powershell Import-Certificate or the GUI equivalent
  • Mac: Via Keychain Access
  • NSS under linux - it is unclear which NSS database it uses. certutil is used to edit them.
like image 162
Jan Schejbal Avatar answered Nov 12 '22 07:11

Jan Schejbal