summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authortb <>2023-04-28 14:45:51 +0000
committertb <>2023-04-28 14:45:51 +0000
commit315cfd46952ee5e87a2f3d64f5688b53318c89f7 (patch)
tree6734ab2075d3aa4273d92f50dd0061ede3147959 /src/regress/lib
parent896fc1b57fd38cb071389334aac7ea12d6dc91df (diff)
downloadopenbsd-315cfd46952ee5e87a2f3d64f5688b53318c89f7.tar.gz
openbsd-315cfd46952ee5e87a2f3d64f5688b53318c89f7.tar.bz2
openbsd-315cfd46952ee5e87a2f3d64f5688b53318c89f7.zip
make the policy test compile on sparc64
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libcrypto/x509/policy/policy.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/x509/policy/policy.c b/src/regress/lib/libcrypto/x509/policy/policy.c
index bffc982f8a..289f96db78 100644
--- a/src/regress/lib/libcrypto/x509/policy/policy.c
+++ b/src/regress/lib/libcrypto/x509/policy/policy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: policy.c,v 1.8 2023/04/28 09:02:04 beck Exp $ */ 1/* $OpenBSD: policy.c,v 1.9 2023/04/28 14:45:51 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-2023 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2020-2023 Bob Beck <beck@openbsd.org>
@@ -125,7 +125,7 @@ verify_cert(const char *roots_file, const char *intermediate_file,
125 X509_STORE_CTX *xsc = NULL; 125 X509_STORE_CTX *xsc = NULL;
126 X509_STORE *store = NULL; 126 X509_STORE *store = NULL;
127 X509 *leaf = NULL; 127 X509 *leaf = NULL;
128 int ret; 128 int flags, ret;
129 129
130 *chains = 0; 130 *chains = 0;
131 *error = 0; 131 *error = 0;
@@ -150,7 +150,7 @@ verify_cert(const char *roots_file, const char *intermediate_file,
150 errx(1, "failed to init store context"); 150 errx(1, "failed to init store context");
151 } 151 }
152 152
153 int flags = X509_V_FLAG_POLICY_CHECK; 153 flags = X509_V_FLAG_POLICY_CHECK;
154 flags |= verify_flags; 154 flags |= verify_flags;
155 if (mode == MODE_LEGACY_VFY) 155 if (mode == MODE_LEGACY_VFY)
156 flags |= X509_V_FLAG_LEGACY_VERIFY; 156 flags |= X509_V_FLAG_LEGACY_VERIFY;
@@ -583,6 +583,7 @@ struct verify_cert_test verify_cert_tests[] = {
583static int 583static int
584verify_cert_test(int mode) 584verify_cert_test(int mode)
585{ 585{
586 ASN1_OBJECT *policy_oid, *policy_oid2;
586 struct verify_cert_test *vct; 587 struct verify_cert_test *vct;
587 int chains, error, error_depth; 588 int chains, error, error_depth;
588 int failed = 0; 589 int failed = 0;
@@ -590,9 +591,9 @@ verify_cert_test(int mode)
590 591
591 for (i = 0; i < N_VERIFY_CERT_TESTS; i++) { 592 for (i = 0; i < N_VERIFY_CERT_TESTS; i++) {
592 vct = &verify_cert_tests[i]; 593 vct = &verify_cert_tests[i];
593 ASN1_OBJECT *policy_oid = vct->policy_oid_to_check ? 594 policy_oid = vct->policy_oid_to_check ?
594 OBJ_txt2obj(vct->policy_oid_to_check, 1) : NULL; 595 OBJ_txt2obj(vct->policy_oid_to_check, 1) : NULL;
595 ASN1_OBJECT *policy_oid2 = vct->policy_oid_to_check2 ? 596 policy_oid2 = vct->policy_oid_to_check2 ?
596 OBJ_txt2obj(vct->policy_oid_to_check2, 1) : NULL; 597 OBJ_txt2obj(vct->policy_oid_to_check2, 1) : NULL;
597 598
598 error = 0; 599 error = 0;