--- h:\prj\1original\openssl\openssl\crypto\err\err_prn.c	2010-04-29 17:59:34.000000000 +-0200
+++ h:\prj\3actual\openssl\crypto\err\err_prn.c	2009-08-24 18:25:55.000000000 +-0200
@@ -78,11 +77,12 @@
 	es=CRYPTO_THREADID_hash(&cur);
 	while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0)
 		{
 		ERR_error_string_n(l, buf, sizeof buf);
 		BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
 			file, line, (flags & ERR_TXT_STRING) ? data : "");
-		cb(buf2, strlen(buf2), u);
+		if (cb(buf2, strlen(buf2), u) <= 0)
+			break; /* abort outputting the error report */
 		}
 	}
 
 #ifndef OPENSSL_NO_FP_API
