From 3cade00e444bbb76ce7b07bc5caf2a1183a97350 Mon Sep 17 00:00:00 2001 From: jsing Date: Mon, 15 Feb 2021 17:57:58 +0000 Subject: [PATCH] Only print the certificate file once on verifification failure. Noted by Steffen Ullrich. ok tb@ --- usr.bin/openssl/verify.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/usr.bin/openssl/verify.c b/usr.bin/openssl/verify.c index 22b5aa663c9..dd321761d34 100644 --- a/usr.bin/openssl/verify.c +++ b/usr.bin/openssl/verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verify.c,v 1.13 2020/11/03 18:50:25 tb Exp $ */ +/* $OpenBSD: verify.c,v 1.14 2021/02/15 17:57:58 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -379,8 +379,6 @@ check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, if (x == NULL) goto end; - fprintf(stdout, "%s: ", certfile); - if ((csc = X509_STORE_CTX_new()) == NULL) goto end; X509_STORE_set_flags(ctx, vflags); @@ -395,7 +393,7 @@ check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, verify_err = X509_STORE_CTX_get_error(csc); if (i > 0 && verify_err == X509_V_OK) { - fprintf(stdout, "OK\n"); + fprintf(stdout, "%s: OK\n", certfile); ret = 1; } else { fprintf(stdout, "%s: verification failed: %d (%s)\n", certfile, -- 2.20.1