diff options
author | tb <> | 2020-09-18 14:58:04 +0000 |
---|---|---|
committer | tb <> | 2020-09-18 14:58:04 +0000 |
commit | b13d3e05d87fc11792844aed652f7b8d17e19437 (patch) | |
tree | 39352e77001dc53480a8ee6e080d2ff6234ace69 /src/regress/lib | |
parent | 73030173f921344c5dd3d134c6cb82d5ae621b6d (diff) | |
download | openbsd-b13d3e05d87fc11792844aed652f7b8d17e19437.tar.gz openbsd-b13d3e05d87fc11792844aed652f7b8d17e19437.tar.bz2 openbsd-b13d3e05d87fc11792844aed652f7b8d17e19437.zip |
make this test compile and pass on sparc64 by moving variable declarations
to the beginning of the respective scopes (and out of for loops)
Diffstat (limited to 'src/regress/lib')
-rw-r--r-- | src/regress/lib/libcrypto/x509/verify.c | 13 |
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, |