From 99ecd586d46ad5d8467090443624b632c8b0a16f Mon Sep 17 00:00:00 2001 From: VaclavT Date: Mon, 3 May 2021 18:33:33 +0200 Subject: [PATCH] better error messages --- clib/sslclient.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clib/sslclient.cpp b/clib/sslclient.cpp index 43bbd69..6ddac71 100644 --- a/clib/sslclient.cpp +++ b/clib/sslclient.cpp @@ -175,7 +175,7 @@ int HttpClient::sslRequest(const std::string &server_name, const std::string &re int s; s = socket(AF_INET, SOCK_STREAM, 0); if (!s) { - printf("MlError creating socket.\n"); + printf("sslRequest, error creating socket.\n"); return -1; } @@ -190,7 +190,7 @@ int HttpClient::sslRequest(const std::string &server_name, const std::string &re // connect to server if (connect(s, (struct sockaddr *) &sa, socklen)) { - printf("MlError connecting to server.\n"); + printf("sslRequest, error connecting to server.\n"); return -1; } @@ -201,7 +201,7 @@ int HttpClient::sslRequest(const std::string &server_name, const std::string &re SSL_CTX *ctx = SSL_CTX_new(meth); ssl = SSL_new(ctx); if (!ssl) { - printf("MlError creating SSL.\n"); + printf("sslRequest, error creating SSL.\n"); log_ssl(); return -1; } @@ -212,7 +212,7 @@ int HttpClient::sslRequest(const std::string &server_name, const std::string &re int err = SSL_connect(ssl); if (err <= 0) { - printf("MlError creating SSL connection. err=%x\n", err); + printf("sslRequest, error creating SSL connection. err=%x\n", err); log_ssl(); fflush(stdout); return -1;