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

Sets the curl proxy ssl verify options to the values of the host configuration options #1629

Closed
wants to merge 1 commit into from

Conversation

jcorporation
Copy link
Member

@jcorporation jcorporation commented Sep 27, 2022

This fixes #1616

Or do you want two new configuration options for the curl plugin?

@@ -122,6 +122,14 @@ public:
easy.SetVerifyPeer(value);
}

void SetProxyVerifyHost(bool value) {
easy.SetOption(CURLOPT_PROXY_SSL_VERIFYHOST, value == 1 ? 2L : 0L);
Copy link
Member

Choose a reason for hiding this comment

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

Don't compare a bool with an int!

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@MaxKellermann
Copy link
Member

I'm not sure if that should be a separate option - I guess if you disable verify, you're completely lost already anyway? Is it helpful to verify the proxy but not the final server?

@MaxKellermann
Copy link
Member

value == true is a complicated way of saying value ;-)

@jcorporation
Copy link
Member Author

I'm not sure if that should be a separate option - I guess if you disable verify, you're completely lost already anyway? Is it helpful to verify the proxy but not the final server?

This was also my assumption.

@jcorporation
Copy link
Member Author

Reading https://curl.se/libcurl/c/CURLOPT_PROXY_SSL_VERIFYHOST.html
This option must be set to 2L not 1 (true), if I do not missread the documentation.

@MaxKellermann
Copy link
Member

Cherry-picked to v0.23.x 7ab0dfc

@MaxKellermann
Copy link
Member

This option must be set to 2L not 1 (true), if I do not missread the documentation.

True, and that's what your code does. The bool check is on the other side of the expression and is unrelated to that.

@jcorporation jcorporation deleted the curl branch October 2, 2022 13:31
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.

Cannot skip CA verification when using CURL input plugin
2 participants