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 root cert validation on CURL #4821

Merged
merged 5 commits into from
Jul 28, 2023
Merged

Conversation

RickWinter
Copy link
Member

@RickWinter RickWinter commented Jul 27, 2023

Add support for validating root certificates when CURL version is >= 7.77.0 .

Fixes #4792

Copy link
Member

@ahsonkhan ahsonkhan left a comment

Choose a reason for hiding this comment

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

Looks good, but I recommend throwing if the option is set on older versions, for usability.

@RickWinter RickWinter linked an issue Jul 28, 2023 that may be closed by this pull request
@RickWinter RickWinter merged commit db32889 into Azure:main Jul 28, 2023
@RickWinter RickWinter deleted the CurlVersion branch July 28, 2023 16:39
@@ -62,6 +62,8 @@ namespace Azure { namespace Core { namespace Http {
* @remark More about this option:
* https://curl.se/libcurl/c/CURLOPT_CAINFO_BLOB.html
*
* @warning Requires libcurl >= 7.44.0
*
*/
std::string PemEncodedExpectedRootCertificates;
Copy link
Member

Choose a reason for hiding this comment

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

Because we are not if-defing this out for older versions, any customer who sets this with older version of curl will be surprised to see it ignored.

Throwing is a good signal that the customer has to fix something, rather than silently ignoring the setting.

Copy link
Member

Choose a reason for hiding this comment

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

I'm 50/50 on throwing here. If the customer notices it's ignored, there is a rather clear indication in the code describing the reason for the option being ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minimum required curl version should be updated.
3 participants