azure-sdk-for-cpp
azure-sdk-for-cpp copied to clipboard
The CURLCode CURLE_SSL_PEER_CERTIFICATE (with value 51) is obsolete. Explicitly update to use CURLE_PEER_FAILED_VERIFICATION
This symbol was added in version 7.8 but later deprecated in version 7.17.1: https://curl.se/changes.html#7_17_1
This current implementation of the CurlConnection
ctor needs to be looked into further. Particularly, this code snippet:
https://github.com/Azure/azure-sdk-for-cpp/blob/698490f175e57007d478fa9cab1faeef9ef19409/sdk/core/azure-core/src/http/curl/curl.cpp#L2521-L2539
The curl documentation doesn't mention CURLE_SSL_PEER_CERTIFICATE
and says the following:
Obsolete errors (50-51) Not used in modern versions.
https://curl.se/libcurl/c/libcurl-errors.html
It looks like the current version of that error is:
CURLE_PEER_FAILED_VERIFICATION (60) The remote server's SSL certificate or SSH fingerprint was deemed not OK. This error code has been unified with CURLE_SSL_CACERT since 7.62.0. Its previous value was 51.
The only reason the code continues to work is due to this macro, which treats this error the same as 60, which could be removed at any time: https://github.com/curl/curl/blob/565d28dc8e910386d9d215e0440291bb8c4238f8/include/curl/curl.h#L661-L663