diff options
author | Adam Langley <agl@chromium.org> | 2018-08-06 16:03:07 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2018-08-21 12:42:22 -0700 |
commit | 0666600823bfef07ff725e8c3106e43b09d201a9 (patch) | |
tree | 0f079a98a4b94beeb4fc4ade502ca434a8ce7422 | |
parent | 8387ad3fa708993a6af162bae71cdc2a8716e501 (diff) | |
download | fsverity-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.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -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) |