summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/x509/verify.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/regress/lib/libcrypto/x509/verify.c b/src/regress/lib/libcrypto/x509/verify.c
index 1a11c2ffe5..f3e883b8ac 100644
--- a/src/regress/lib/libcrypto/x509/verify.c
+++ b/src/regress/lib/libcrypto/x509/verify.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: verify.c,v 1.2 2020/09/13 15:06:17 beck Exp $ */ 1/* $OpenBSD: verify.c,v 1.3 2020/09/18 14:58:04 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2020 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -198,10 +198,15 @@ verify_cert_new(const char *roots_file, const char *bundle_file, int *chains)
198 x509_verify_ctx_error_depth(ctx), 198 x509_verify_ctx_error_depth(ctx),
199 x509_verify_ctx_error_string(ctx)); 199 x509_verify_ctx_error_string(ctx));
200 } else { 200 } else {
201 for (int c = 0; verbose && c < *chains; c++) { 201 int c;
202
203 for (c = 0; verbose && c < *chains; c++) {
204 STACK_OF(X509) *chain;
205 int i;
206
202 fprintf(stderr, "Chain %d\n--------\n", c); 207 fprintf(stderr, "Chain %d\n--------\n", c);
203 STACK_OF(X509) * chain = x509_verify_ctx_chain(ctx, c); 208 chain = x509_verify_ctx_chain(ctx, c);
204 for (int i = 0; i < sk_X509_num(chain); i++) { 209 for (i = 0; i < sk_X509_num(chain); i++) {
205 X509 *cert = sk_X509_value(chain, i); 210 X509 *cert = sk_X509_value(chain, i);
206 X509_NAME_print_ex_fp(stderr, 211 X509_NAME_print_ex_fp(stderr,
207 X509_get_subject_name(cert), 0, 212 X509_get_subject_name(cert), 0,