-
Notifications
You must be signed in to change notification settings - Fork 23
self signed certificate in certificate chain #28
Comments
👍 Working with a Github Enterprise, this plugin would be really awesome, but it fails due to this certificate issue. The Github site certificate was issued by a self-signed corporate PKI, and added to the OS. I have tried the following :
Without any success so far. |
The GitHub module can take |
It would be even better if it could make use of the SSL library we have chosen when installing git. We chose the windows SSL library which means git.exe connects fine without needing to lower security, but the extension still fails with |
There is a command line option to make Node use the OpenSSL CA store instead of the built-in Mozilla CAs. I'm not sure if the OpenSSL CA would pick up CAs from the system CA store on Windows, but since OpenSSL is not a standard install on Windows this probably won't work well. (CLI option: https://nodejs.org/api/cli.html#cli_use_bundled_ca_use_openssl_ca.) There is also a Node module specifically for Windows: https://github.com/ukoloff/win-ca. That would affect all extensions when loaded. |
I hadn't realised it would be node driving the SSL library choice, not git.exe. That makes sense. I will see if the node module helps as I don't think OpenSSL would solve it. It would be great if you can get this as a supported scenario. We're rolling out GitHub Enterprise widely in our company. |
@chrmarti I couldn't see a way to run arbitrary node code prior to launching vscode in order to enable the win-ca module. It looks like it may require an extension. If I had more time, I'd try creating my first extension! |
@mungojam You could: Clone this repository, run |
If someone is still interested, VS Code extension named win-ca is available. It is expected to make Windows' Trusted Root Certificates available to other VS Code extensions. |
@ukoloff thanks for giving it a go, I'm still getting 'self signed certificate in certificate chain' error from this particular extension after installing the new win-ca one. I wonder if it doesn't kick in early enough. Unfortunately we don't have node on our work machines for me to help with debugging the extension directly, but let me know if you want me to check anything else as this would be very handy to have. |
First, let's check, that
Second, which soft complains about self signed certificate? Is is another VSCode extension? Or may be some Node.js package, called by VSCode extension? |
The win-ca folder exists, but there is no pem folder, just lib folder and then the LICENCE, package.json and README.md files.
The error doesn't seem to give any more details, I tried clicking on it. But it comes up as soon as I try to expand the 'GitHub Issues and PRs' section in the Explorer pane. |
It looks like you were too fast and installed win-ca v1.0.0 that has stupid bug. It is hopefully fixed in v1.0.1. Try uninstall, reload, install again and reload. And do you have GitHub extension installed? |
Still same behaviour after reinstalling as per your instructions. The pem folder is still missing. I think I did have v1.0.1 before anyway. I'm on Windows 7 by the way. I didn't have GitHub extension installed, I just tried that but it seems to fail for another reason (says I haven't put a personal token in when I have). |
Curiouser and curiouser. What flavour of Windows 7 are you on? x86 or x64? What is your VSCode version? And again - x86 or x64? Second, next to missing |
x64 Win 7 Pro.
Yep, it prints out tons of hex before closing |
Well, I have no ideas left. I tested several combinations of Windows and VSCode, I even built special version of extension for your VSCode: win-ca-1.0.2.vsix.zip.
I think this will not help too, but... |
Some googling gave an idea:
Are there any error messages conserning |
Got it:
Same error and missing folder with 1.0.2 |
Great! It is highly likely you have non-RSA certificate in store and Can you run something like |
New version without
|
Thanks, that .pem file exists now and the contents look good. The GitHub PRs extension isn't showing up at the moment so I can't verify connectivity, it always seems to be intermittent which is a separate issue. |
@ukoloff it works perfectly! great stuff. I might make use of that pem file for something else too |
In release version this PEM will certainly be relocated to some other folder. Current version is just proof of concept. |
The new version of the win-ca extension just released by @ukoloff fixes this for any certificates trusted by windows. It might be good to suggest to the user that they install this extension if they are on Windows. Or better yet add the win-ca node package or equivalent to VS Code install on windows. |
Opened microsoft/vscode#52880 to track this. Thanks! |
When using a corporate github with self signed ssl cert, the plugin doesn't respect the strict ssl setting :
"http.proxyStrictSSL": false
setting. and throwsPlease add the option for custom ssl certs
Thanks.
The text was updated successfully, but these errors were encountered: