-
Notifications
You must be signed in to change notification settings - Fork 129
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
Conversation
There was a problem hiding this 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.
@@ -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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Add support for validating root certificates when CURL version is >= 7.77.0 .
Fixes #4792