Skip to content

Commit

Permalink
lib-ssl-iostream: Fixed reporting errors returned by OpenSSL.
Browse files Browse the repository at this point in the history
We were always logging all errors as "Stacked error" and then returning
"Unknown error".
  • Loading branch information
sirainen committed Apr 21, 2016
1 parent 556d69b commit e690265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-ssl-iostream/iostream-openssl-common.c
Expand Up @@ -192,7 +192,7 @@ const char *openssl_iostream_error(void)
while ((err = ERR_get_error_line_data(NULL, NULL, &data, &flags)) != 0) {
if (ERR_GET_REASON(err) == ERR_R_MALLOC_FAILURE)
i_fatal_status(FATAL_OUTOFMEM, "OpenSSL malloc() failed");
if (ERR_peek_error() != 0)
if (ERR_peek_error() == 0)
break;
i_error("SSL: Stacked error: %s",
ssl_err2str(err, data, flags));
Expand Down

0 comments on commit e690265

Please sign in to comment.