aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-07-15 00:35:35 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-07-15 00:35:35 +0200
commit02708608a97d021576fd08b39c400a27a590c999 (patch)
tree08d18d172bf53ceddfe7b14f843e00e39aa4d5d8
parentfcc3f9e19c0413eeacbf8c3392b200eff2969810 (diff)
downloadliberty-02708608a97d021576fd08b39c400a27a590c999.tar.gz
liberty-02708608a97d021576fd08b39c400a27a590c999.tar.xz
liberty-02708608a97d021576fd08b39c400a27a590c999.zip
Don't return ugly error strings from OpenSSL
-rw-r--r--liberty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/liberty.c b/liberty.c
index 41e4c6e..aae7102 100644
--- a/liberty.c
+++ b/liberty.c
@@ -2575,7 +2575,7 @@ xssl_get_error (SSL *ssl, int result, const char **error_info)
return error;
case SSL_ERROR_SYSCALL:
if ((error = ERR_get_error ()))
- *error_info = ERR_error_string (error, NULL);
+ *error_info = ERR_reason_error_string (error);
else if (result == 0)
// An EOF that's not according to the protocol is still an EOF
return SSL_ERROR_ZERO_RETURN;
@@ -2588,9 +2588,9 @@ xssl_get_error (SSL *ssl, int result, const char **error_info)
return SSL_ERROR_SSL;
default:
if ((error = ERR_get_error ()))
- *error_info = ERR_error_string (error, NULL);
+ *error_info = ERR_reason_error_string (error);
else
- *error_info = "Unknown error";
+ *error_info = "unknown error";
return SSL_ERROR_SSL;
}
}