From 6468a51ac1f05285eb65e899b8420cfad744bbda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Thu, 4 Apr 2019 01:39:11 +0200 Subject: [PATCH] Add more SSL client error strings --- src/client/http/Request.cpp | 12 +++++++++++- src/client/http/RequestManager.cpp | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/client/http/Request.cpp b/src/client/http/Request.cpp index f802dc73c..d3352a04d 100644 --- a/src/client/http/Request.cpp +++ b/src/client/http/Request.cpp @@ -344,9 +344,19 @@ namespace http case 606: return "Malformed URL"; case 607: return "Connection Refused"; case 608: return "Proxy Server Not Found"; - case 609: return "SSL Failure"; + case 609: return "SSL: invalid certificate status"; case 610: return "Cancelled by Shutdown"; case 611: return "Too Many Redirects"; + case 612: return "SSL: Connect Error"; + case 613: return "SSL: Crypto Engine Not Found"; + case 614: return "SSL: Failed To Set Default Crypto Engine"; + case 615: return "SSL: Local Certificate Issue"; + case 616: return "SSL: Unable To Use Specified Cipher"; + case 617: return "SSL: Failed To Initialise Crypto Engine"; + case 618: return "SSL: Failed To Load CACERT File"; + case 619: return "SSL: Failed To Load CRL File"; + case 620: return "SSL: Issuer Check Failed"; + case 621: return "SSL: Pinned Public Key Mismatch"; default: return "Unknown Status Code"; } } diff --git a/src/client/http/RequestManager.cpp b/src/client/http/RequestManager.cpp index f8bd9790e..f3330cf56 100644 --- a/src/client/http/RequestManager.cpp +++ b/src/client/http/RequestManager.cpp @@ -121,17 +121,17 @@ namespace http case CURLE_COULDNT_RESOLVE_PROXY: finish_with = 608; break; case CURLE_TOO_MANY_REDIRECTS: finish_with = 611; break; - case CURLE_SSL_CONNECT_ERROR: - case CURLE_SSL_ENGINE_NOTFOUND: - case CURLE_SSL_ENGINE_SETFAILED: - case CURLE_SSL_CERTPROBLEM: - case CURLE_SSL_CIPHER: - case CURLE_SSL_ENGINE_INITFAILED: - case CURLE_SSL_CACERT_BADFILE: - case CURLE_SSL_CRL_BADFILE: - case CURLE_SSL_ISSUER_ERROR: - case CURLE_SSL_PINNEDPUBKEYNOTMATCH: - case CURLE_SSL_INVALIDCERTSTATUS: finish_with = 609; break; + case CURLE_SSL_CONNECT_ERROR: finish_with = 612; break; + case CURLE_SSL_ENGINE_NOTFOUND: finish_with = 613; break; + case CURLE_SSL_ENGINE_SETFAILED: finish_with = 614; break; + case CURLE_SSL_CERTPROBLEM: finish_with = 615; break; + case CURLE_SSL_CIPHER: finish_with = 616; break; + case CURLE_SSL_ENGINE_INITFAILED: finish_with = 617; break; + case CURLE_SSL_CACERT_BADFILE: finish_with = 618; break; + case CURLE_SSL_CRL_BADFILE: finish_with = 619; break; + case CURLE_SSL_ISSUER_ERROR: finish_with = 620; break; + case CURLE_SSL_PINNEDPUBKEYNOTMATCH: finish_with = 621; break; + case CURLE_SSL_INVALIDCERTSTATUS: finish_with = 609; break; case CURLE_HTTP2: case CURLE_HTTP2_STREAM: