summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authortb <>2020-09-18 15:23:16 +0000
committertb <>2020-09-18 15:23:16 +0000
commit37220aa8abc8c229561e08b8e6f816b43bcf0bb3 (patch)
treedfd602dc731825696a78eada8577cf376f7e206e /src/regress/lib
parentb13d3e05d87fc11792844aed652f7b8d17e19437 (diff)
downloadopenbsd-37220aa8abc8c229561e08b8e6f816b43bcf0bb3.tar.gz
openbsd-37220aa8abc8c229561e08b8e6f816b43bcf0bb3.tar.bz2
openbsd-37220aa8abc8c229561e08b8e6f816b43bcf0bb3.zip
Move variable declaration to beginning of scope in order to make this
test compile and pass on sparc64.
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libcrypto/x509/bettertls/verify.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/x509/bettertls/verify.c b/src/regress/lib/libcrypto/x509/bettertls/verify.c
index efa531b620..28dde61641 100644
--- a/src/regress/lib/libcrypto/x509/bettertls/verify.c
+++ b/src/regress/lib/libcrypto/x509/bettertls/verify.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: verify.c,v 1.3 2020/09/14 09:59:58 beck Exp $ */ 1/* $OpenBSD: verify.c,v 1.4 2020/09/18 15:23:16 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>
@@ -108,6 +108,7 @@ verify_cert(const char *roots_file, const char *bundle_file,
108 X509_STORE_CTX *xscip = NULL; 108 X509_STORE_CTX *xscip = NULL;
109 X509_STORE *storeip = NULL; 109 X509_STORE *storeip = NULL;
110 X509 *leaf = NULL; 110 X509 *leaf = NULL;
111 unsigned long flags, flagsip;
111 112
112 *ip = *dns = 0; 113 *ip = *dns = 0;
113 114
@@ -137,7 +138,7 @@ verify_cert(const char *roots_file, const char *bundle_file,
137 if (verbose) 138 if (verbose)
138 X509_STORE_CTX_set_verify_cb(xsc, verify_cert_cb); 139 X509_STORE_CTX_set_verify_cb(xsc, verify_cert_cb);
139 140
140 unsigned long flags = X509_VERIFY_PARAM_get_flags(xsc->param); 141 flags = X509_VERIFY_PARAM_get_flags(xsc->param);
141 X509_VERIFY_PARAM_set_flags(xsc->param, flags); 142 X509_VERIFY_PARAM_set_flags(xsc->param, flags);
142 X509_VERIFY_PARAM_set_time(xsc->param, 1600000000); 143 X509_VERIFY_PARAM_set_time(xsc->param, 1600000000);
143 X509_VERIFY_PARAM_set1_host(xsc->param,"localhost.local", strlen("localhost.local")); 144 X509_VERIFY_PARAM_set1_host(xsc->param,"localhost.local", strlen("localhost.local"));
@@ -163,7 +164,7 @@ verify_cert(const char *roots_file, const char *bundle_file,
163 if (verbose) 164 if (verbose)
164 X509_STORE_CTX_set_verify_cb(xscip, verify_cert_cb); 165 X509_STORE_CTX_set_verify_cb(xscip, verify_cert_cb);
165 166
166 unsigned long flagsip = X509_VERIFY_PARAM_get_flags(xscip->param); 167 flagsip = X509_VERIFY_PARAM_get_flags(xscip->param);
167 X509_VERIFY_PARAM_set_flags(xscip->param, flagsip); 168 X509_VERIFY_PARAM_set_flags(xscip->param, flagsip);
168 X509_VERIFY_PARAM_set_time(xscip->param, 1600000000); 169 X509_VERIFY_PARAM_set_time(xscip->param, 1600000000);
169 X509_VERIFY_PARAM_set1_ip_asc(xscip->param,"127.0.0.1"); 170 X509_VERIFY_PARAM_set1_ip_asc(xscip->param,"127.0.0.1");