changeset 20533:5b1137b457a2

lib-dcrypt: Improved error message when istream isn't encrypted.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Mon, 11 Jul 2016 20:27:14 +0300
parents b9bcdf499df0
children cffb60b15b6e
files src/lib-dcrypt/istream-decrypt.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-dcrypt/istream-decrypt.c	Tue Jul 19 18:28:06 2016 +0300
+++ b/src/lib-dcrypt/istream-decrypt.c	Mon Jul 11 20:27:14 2016 +0300
@@ -556,7 +556,7 @@
 	if (mlen < sizeof(IOSTREAM_CRYPT_MAGIC))
 		return 0;
 	if (memcmp(data, IOSTREAM_CRYPT_MAGIC, sizeof(IOSTREAM_CRYPT_MAGIC)) != 0) {
-		io_stream_set_error(&stream->istream.iostream, "Invalid magic");
+		io_stream_set_error(&stream->istream.iostream, "Stream is not encrypted (invalid magic)");
 		stream->istream.istream.stream_errno = EINVAL;
 		return -1;
 	}