diff options
author | Han Han <hhan@thousandeyes.com> | 2018-08-22 11:13:32 -0700 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-09-06 08:27:15 +0200 |
commit | 3f3b26d6feb0667714902e836af608094235fca2 (patch) | |
tree | 40233ba07978511da7e8a0d958261d3fda65169b /lib | |
parent | 0029aabc5620563a840ea13b313f29ea2a9b395e (diff) | |
download | curl-3f3b26d6feb0667714902e836af608094235fca2.tar.gz |
ssl: deprecate CURLE_SSL_CACERT in favour of a unified error code
Long live CURLE_PEER_FAILED_VERIFICATION
Diffstat (limited to 'lib')
-rw-r--r-- | lib/strerror.c | 9 | ||||
-rw-r--r-- | lib/vtls/darwinssl.c | 2 | ||||
-rw-r--r-- | lib/vtls/nss.c | 1 |
3 files changed, 4 insertions, 8 deletions
diff --git a/lib/strerror.c b/lib/strerror.c index 0295d6c27..47ef44a66 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -191,9 +191,6 @@ curl_easy_strerror(CURLcode error) case CURLE_TELNET_OPTION_SYNTAX : return "Malformed telnet option"; - case CURLE_PEER_FAILED_VERIFICATION: - return "SSL peer certificate or SSH remote key was not OK"; - case CURLE_GOT_NOTHING: return "Server returned nothing (no headers, no data)"; @@ -218,9 +215,8 @@ curl_easy_strerror(CURLcode error) case CURLE_SSL_CIPHER: return "Couldn't use specified SSL cipher"; - case CURLE_SSL_CACERT: - return "Peer certificate cannot be authenticated with given CA " - "certificates"; + case CURLE_PEER_FAILED_VERIFICATION: + return "SSL peer certificate or SSH remote key was not OK"; case CURLE_SSL_CACERT_BADFILE: return "Problem with the SSL CA cert (path? access rights?)"; @@ -324,6 +320,7 @@ curl_easy_strerror(CURLcode error) case CURLE_OBSOLETE44: case CURLE_OBSOLETE46: case CURLE_OBSOLETE50: + case CURLE_OBSOLETE51: case CURLE_OBSOLETE57: case CURL_LAST: break; diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c index 6ea43542d..ae8a5cc1e 100644 --- a/lib/vtls/darwinssl.c +++ b/lib/vtls/darwinssl.c @@ -2099,7 +2099,7 @@ static int append_cert_to_array(struct Curl_easy *data, switch(result) { case CURLE_OK: break; - case CURLE_SSL_CACERT: + case CURLE_PEER_FAILED_VERIFICATION: return CURLE_SSL_CACERT_BADFILE; case CURLE_OUT_OF_MEMORY: default: diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index 89f818397..4eb6a7792 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -1522,7 +1522,6 @@ static bool is_nss_error(CURLcode err) { switch(err) { case CURLE_PEER_FAILED_VERIFICATION: - case CURLE_SSL_CACERT: case CURLE_SSL_CERTPROBLEM: case CURLE_SSL_CONNECT_ERROR: case CURLE_SSL_ISSUER_ERROR: |