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

Retry failed downloads without the specified RootCAs to use the default CAs #39

Conversation

slhultgren
Copy link
Contributor

On Windows x509.SystemCertPool() always returns nil which means that Windows users
with NODE_EXTRA_CA_CERTS defined will only get the NODE_EXTRA_CA_CERTS.
Therefore, if RootCAs was created, and the download fail, retry with RootCAs as nil to allow Go to figure out the proper CAs.

Improves the situation on Windows of the issue introduced with pull #28 for issue #4 .
Issue still remains though that on Windows the system certificates and the NODE_EXTRA_CA_CERTS will not be available at the same time for a certain download task.

…onfig, retry download with default RootCA.

On Windows x509.SystemCertPool() always returns nil which means that Windows users
with NODE_EXTRA_CA_CERTS defined will only get the NODE_EXTRA_CA_CERTS.
Therefore, if RootCAs was created, and the download fail, retry with RootCAs as nil to allow Go to figure out the proper CAs.

Signed-off-by: Samuel HULTGREN <[email protected]>
@slhultgren
Copy link
Contributor Author

@develar can you please have a look at this PR? Like I said, it is not a complete fix for the issues on Windows (since not all certificates will be available at the same time), but at least it will use the system certificates on the retry if NODE_EXTRA_CA_CERTS was used.

@develar develar merged commit 8bef6b3 into develar:master Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants