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

git, openssl, curl: Respect $NIX_SSL_CERT_FILE #24121

Merged
merged 1 commit into from Mar 20, 2017
Merged

Conversation

domenkozar
Copy link
Member

@mention-bot
Copy link

@domenkozar, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edef1c, @ikervagyok and @edolstra to be potential reviewers.

@edolstra edolstra merged commit c7a6b5e into staging Mar 20, 2017
@domenkozar domenkozar deleted the fix-darwin-ssl-23605 branch March 20, 2017 13:26
+ if (getenv("NIX_SSL_CERT_FILE"))
+ set_from_env(&ssl_cainfo, "NIX_SSL_CERT_FILE");
+ else
+ set_from_env(&ssl_cainfo, "SSL_CERT_FILE");
Copy link
Member

@layus layus Mar 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not appear here. Git does follow SSL_CERT_FILE by default. There is no reason to keep this line if we use NIX_SSL_CERT_FILE. Git uses openssl and without this override, the underlying openssl will look at SSL_CERT_FILE anyway.

tl;dr set_from_env(&ssl_cainfo, "SSL_CERT_FILE"); should not appear here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, NIX_SSL_CERT_FILE is tried by the patched openssl as well...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, NIX_SSL_CERT_FILE should be a default value, not a global override. If someone knows better than us where to look for the CA bundle, let them have it their way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, SSL_CERT_FILE was introduced by #14617. There was not much investigation to understand the issue. Maybe it was due to some misconfigured openssl, Or this i really needed. Who knows... Anyway, it's NIX_SSL_CERT_FILE which is needed, not "SSL_CERT_FILE".

- env = curlx_getenv("SSL_CERT_FILE");
+ env = curlx_getenv("NIX_SSL_CERT_FILE");
+ if(!env)
+ env = curlx_getenv("SSL_CERT_FILE");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, let SSL_CERT_FILE return to its rank of default value if none provided. We now use "NIX_SSL_CERT_FILE" as first priority override.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is intentional because of Darwin #23605.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this one is correct because it is how curl works...

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.

None yet

5 participants