diff --git a/src/Network/Http.cpp b/src/Network/Http.cpp index 6ca7310..1769e62 100644 --- a/src/Network/Http.cpp +++ b/src/Network/Http.cpp @@ -87,8 +87,14 @@ std::string HTTP::Get(const std::string& IP) { if (isDownload) { std::cout << "\n"; } + auto result = cli.get_openssl_verify_result(); + std::string verify_error; + if (result) { + verify_error = X509_verify_cert_error_string(result); + } + WriteHttpDebug(cli, "GET", IP, res); - error("HTTP Get failed on " + to_string(res.error()) + ", ssl verify = " + std::to_string(cli.get_openssl_verify_result())); + error("HTTP Get failed on " + to_string(res.error()) + ", ssl verify = " + verify_error); } return Ret; @@ -128,8 +134,13 @@ std::string HTTP::Post(const std::string& IP, const std::string& Fields) { } Ret = res->body; } else { + auto result = cli.get_openssl_verify_result(); + std::string verify_error; + if (result) { + verify_error = X509_verify_cert_error_string(result); + } WriteHttpDebug(cli, "POST", IP, res); - error("HTTP Post failed on " + to_string(res.error()) + ", ssl verify = " + std::to_string(cli.get_openssl_verify_result())); + error("HTTP Post failed on " + to_string(res.error()) + ", ssl verify = " + verify_error); } }