Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support self signed certificates #3

Open
mulbc opened this issue Mar 20, 2018 · 4 comments
Open

Support self signed certificates #3

mulbc opened this issue Mar 20, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mulbc
Copy link

mulbc commented Mar 20, 2018

Please support self signed certificates for the Redmine instance.
For my Redmine the certificate is actually signed by a trusted CA (which is in my Keychain) but your extension doesn't pick up the trust.

System: OSX 10.13.3
VSCode: 1.21.1

extension vscode-redmine redmine 2018-03-20 14-19-47

Invoked by: Redmine: List open issues assigned to me

@rozpuszczalny rozpuszczalny self-assigned this Mar 21, 2018
@rozpuszczalny rozpuszczalny added the enhancement New feature or request label Mar 21, 2018
@rozpuszczalny
Copy link
Owner

Hi,
unfortunately there is no easy fix to this, due to constant list of CA certificates in Node.js (see nodejs/node#4175). I've added parameter called redmine.rejectUnauthorized, which sets rejectUnauthorized in https request options. Set it to false when you want to use self-signed certificates. It isn't the best solution, but it works. I'll add this in the next minor version of this extension with some other features.

@AdamMajer
Copy link

NodeJS doesn't have a constant list of certificates for a long time. It allows overrides both at command line and programmatically . node --help | grep CA

There is actually an environmental option,

NODE_TLS_REJECT_UNAUTHORIZED
When set to 0, TLS certificate validation is disabled.

@rozpuszczalny
Copy link
Owner

Indeed, I've missed information about https.request() options, which supports using ca, cert etc. (ref: https.request()).

I can't use environment variables, because I have no power to control startup of node script (VSCode manages it).

I'm reopening this issue to provide CA path parameter, however I can't provide support for CA added in system keychain (if there is a way, please correct me or provide PR ;) ).

@rozpuszczalny rozpuszczalny reopened this Feb 8, 2019
@AdamMajer
Copy link

NodeJS uses OpenSSL so it depends how node was compiled and what OS it's running on. On Linux if using system CA's, it would pick up that CA. On Windows, probably not. It's system dependent.

Keep in mind that the ca option replaces all certs

@rozpuszczalny rozpuszczalny added this to the 1.1.0 milestone Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants