]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ssl-iostream: If verbose=TRUE, internally log all errors.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 28 Feb 2016 17:55:53 +0000 (19:55 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 28 Feb 2016 17:55:53 +0000 (19:55 +0200)
src/lib-ssl-iostream/iostream-openssl.c

index 5e61bcae40ba36312a328ed1e405614c3b18d382..54b06c0899e2279662a34432da987cfae68348d3 100644 (file)
@@ -12,6 +12,12 @@ static void openssl_iostream_free(struct ssl_iostream *ssl_io);
 static void
 openssl_iostream_set_error(struct ssl_iostream *ssl_io, const char *str)
 {
+       if (ssl_io->verbose) {
+               /* This error should normally be logged by lib-ssl-iostream's
+                  caller. But if verbose=TRUE, log it here as well to make
+                  sure that the error is always logged. */
+               i_debug("%sSSL error: %s", ssl_io->log_prefix, str);
+       }
        i_free(ssl_io->last_error);
        ssl_io->last_error = i_strdup(str);
 }