Skip to content

Commit

Permalink
UTIL: Fix compilation with curl 7.62.0
Browse files Browse the repository at this point in the history
The macro CURLE_SSL_CACERT is deprecated in upstream curl
since commit 3f3b26d6feb0667714902e836af608094235fca2.

  commit 3f3b26d6feb0667714902e836af608094235fca2
  Author: Han Han <hhan@thousandeyes.com>
  Date:   Wed Aug 22 11:13:32 2018 -0700

      ssl: deprecate CURLE_SSL_CACERT in favour of a unified error code

      Long live CURLE_PEER_FAILED_VERIFICATION

  sh$ git tag --contains 3f3b26d6feb0667714902e836af608094235fca2
  curl-7_62_0

It was not removed. It is just an alias to
CURLE_PEER_FAILED_VERIFICATION which causes compile time failures in
switch/case.

./src/util/tev_curl.c: In function 'curl_code2errno':
./src/util/tev_curl.c:113:5: error: duplicate case value
     case CURLE_PEER_FAILED_VERIFICATION:
     ^~~~
./src/util/tev_curl.c: 100:5: note: previously used here
     case CURLE_SSL_CACERT:
     ^~~~

Merges: https://pagure.io/SSSD/sssd/pull-request/3878

Resolves:
https://pagure.io/SSSD/sssd/issue/3875

Reviewed-by: Sumit Bose <sbose@redhat.com>
  • Loading branch information
Lukas Slebodnik authored and jhrozek committed Nov 8, 2018
1 parent 66da9d9 commit 1ee12b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util/tev_curl.c
Expand Up @@ -97,7 +97,9 @@ static errno_t curl_code2errno(CURLcode crv)
return ETIMEDOUT;
case CURLE_SSL_ISSUER_ERROR:
case CURLE_SSL_CACERT_BADFILE:
#if LIBCURL_VERSION_NUM < 0x073e00
case CURLE_SSL_CACERT:
#endif
case CURLE_SSL_CERTPROBLEM:
return ERR_INVALID_CERT;

Expand Down

0 comments on commit 1ee12b0

Please sign in to comment.