diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2020-09-18 15:23:17 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2020-09-18 15:23:17 +0000 |
commit | 068c75ac282ee93a1ca28e4b85e568d5f47fad74 (patch) | |
tree | 778ee7911e09e36224a8c7c0a2e978656232e30f | |
parent | 8dfcbf2bb2d26aa5e27e72a255b46a44dad5f8dd (diff) |
Move variable declaration to beginning of scope in order to make this
test compile and pass on sparc64.
-rw-r--r-- | regress/lib/libcrypto/x509/bettertls/verify.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/regress/lib/libcrypto/x509/bettertls/verify.c b/regress/lib/libcrypto/x509/bettertls/verify.c index efa531b6203..28dde616414 100644 --- a/regress/lib/libcrypto/x509/bettertls/verify.c +++ b/regress/lib/libcrypto/x509/bettertls/verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verify.c,v 1.3 2020/09/14 09:59:58 beck Exp $ */ +/* $OpenBSD: verify.c,v 1.4 2020/09/18 15:23:16 tb Exp $ */ /* * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> * Copyright (c) 2020 Bob Beck <beck@openbsd.org> @@ -108,6 +108,7 @@ verify_cert(const char *roots_file, const char *bundle_file, X509_STORE_CTX *xscip = NULL; X509_STORE *storeip = NULL; X509 *leaf = NULL; + unsigned long flags, flagsip; *ip = *dns = 0; @@ -137,7 +138,7 @@ verify_cert(const char *roots_file, const char *bundle_file, if (verbose) X509_STORE_CTX_set_verify_cb(xsc, verify_cert_cb); - unsigned long flags = X509_VERIFY_PARAM_get_flags(xsc->param); + flags = X509_VERIFY_PARAM_get_flags(xsc->param); X509_VERIFY_PARAM_set_flags(xsc->param, flags); X509_VERIFY_PARAM_set_time(xsc->param, 1600000000); 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, if (verbose) X509_STORE_CTX_set_verify_cb(xscip, verify_cert_cb); - unsigned long flagsip = X509_VERIFY_PARAM_get_flags(xscip->param); + flagsip = X509_VERIFY_PARAM_get_flags(xscip->param); X509_VERIFY_PARAM_set_flags(xscip->param, flagsip); X509_VERIFY_PARAM_set_time(xscip->param, 1600000000); X509_VERIFY_PARAM_set1_ip_asc(xscip->param,"127.0.0.1"); |