vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Downloading package 'Visual Studio Windows Debugger' Failed at stage: downloadPackages Error: self signed certificate in certificate chain

Open garoyeri opened this issue 10 years ago • 7 comments

When trying to run the plugin from behind a corporate SSL proxy, I get the following message:

Updating C/C++ dependencies...

Downloading package 'Visual Studio Windows Debugger' Failed at stage: downloadPackages
Error: self signed certificate in certificate chain

Finished

This issue was resolved for the C# plugin in this issue: https://github.com/OmniSharp/omnisharp-vscode/issues/957

garoyeri avatar Nov 17 '16 14:11 garoyeri

Here is the PR: https://github.com/OmniSharp/omnisharp-vscode/pull/958

gregg-miskelly avatar Nov 17 '16 15:11 gregg-miskelly

@garoyeri I don't have a corporate SSL proxy so I don't have a way to test this, but in our extension's package manager code, I see the following block, which should respect the http.proxyStrictSSL settings already. Does setting that value work for you?

        let strictProxy = vscode.workspace.getConfiguration().get("http.proxyStrictSSL", true);
        let proxyOptions = {
            host: proxyUrl.hostname,
            port: parseInt(proxyUrl.port, 10),
            auth: proxyUrl.auth,
            rejectUnauthorized: strictProxy
        };

        return new HttpsProxyAgent(proxyOptions);

pieandcakes avatar Nov 22 '16 19:11 pieandcakes

I've set only the http.proxyStrictSSL flag, but not the proxy URL or the proxy Port. It works for the Extension manager and they fixed it with the OmniSharp plugin as well.

garoyeri avatar Nov 24 '16 02:11 garoyeri

Here's the related issue: https://github.com/OmniSharp/omnisharp-vscode/issues/579

garoyeri avatar Nov 24 '16 02:11 garoyeri

@garoyeri I made a change that will be available in the next release.

pieandcakes avatar Nov 28 '16 20:11 pieandcakes

I tested with 0.9.3 and it works as expected. The additional tools were automatically downloaded and installed. My company proxy interrupted the 3rd download (Debugger), but restarting Visual Studio Code allowed it to redownload properly and install.

garoyeri avatar Dec 12 '16 19:12 garoyeri

Thanks. I'll consider this issue resolved.

pieandcakes avatar Dec 12 '16 19:12 pieandcakes