aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Langley <agl@chromium.org>2018-08-06 16:03:07 -0700
committerEric Biggers <ebiggers@google.com>2018-08-21 12:42:22 -0700
commit0666600823bfef07ff725e8c3106e43b09d201a9 (patch)
tree0f079a98a4b94beeb4fc4ade502ca434a8ce7422
parent8387ad3fa708993a6af162bae71cdc2a8716e501 (diff)
downloadfsverity-utils-0666600823bfef07ff725e8c3106e43b09d201a9.tar.gz
Use ERR_print_errors_fp to print OpenSSL errors.
This function is easier to call and, more importantly, includes more information about the errors in the output. Signed-off-by: Adam Langley <agl@chromium.org> Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r--sign.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sign.c b/sign.c
index a2f4a1e..13a3f3d 100644
--- a/sign.c
+++ b/sign.c
@@ -22,19 +22,11 @@
static void display_openssl_errors(void)
{
- unsigned long e;
- const char *file;
- int line;
- char errmsg[128];
-
if (ERR_peek_error() == 0)
return;
fprintf(stderr, "OpenSSL library errors:\n");
- while ((e = ERR_get_error_line(&file, &line)) != 0) {
- ERR_error_string_n(e, errmsg, sizeof(errmsg));
- fprintf(stderr, "\t%s: %s:%d\n", errmsg, file, line);
- }
+ ERR_print_errors_fp(stderr);
}
static BIO *new_mem_buf(const void *buf, size_t size)