From 6627c9d346b887016afa92664f690a0310d4ce00 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 2 Apr 2018 13:31:32 -0400 Subject: [PATCH 21/25] On PKCS#7 verify failures log the PKCS#7 file, fix variable used results was being used in place of results2. In practice it would be the result of GetCACaps which means it would log _something_, just not the failed PKCS#7 file. --- src/scep.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scep.c b/src/scep.c index 0dbdcd7..5dd362d 100644 --- a/src/scep.c +++ b/src/scep.c @@ -920,15 +920,18 @@ main(int argc, const char **argv) if (i != 0) { printf(_("Error: failed to verify signature on " "server response.\n")); + cm_log(1, "Error: failed to verify signature on " + "server response.\n"); while ((error = ERR_get_error()) != 0) { memset(buf, '\0', sizeof(buf)); ERR_error_string_n(error, buf, sizeof(buf)); cm_log(1, "%s\n", buf); } - s = cm_store_base64_from_bin(ctx, (unsigned char *) results, - results_length); + s = cm_store_base64_from_bin(ctx, (unsigned char *) results2, + results_length2); s = cm_submit_u_pem_from_base64("PKCS7", 0, s); fprintf(stderr, "%s", s); + cm_log(1, "%s", s); free(s); return CM_SUBMIT_STATUS_UNREACHABLE; } -- 1.8.3.1