summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-04-28 15:37:28 +0000
committertb <>2023-04-28 15:37:28 +0000
commitf957f5666c561ed19d6ccdd345549d64a645af0b (patch)
tree8d98cd8af74cf6a44006a4fc4f98305e868423eb
parent3c000e0b685c5f4d9f6d81961ee1af66b94f7c6c (diff)
downloadopenbsd-f957f5666c561ed19d6ccdd345549d64a645af0b.tar.gz
openbsd-f957f5666c561ed19d6ccdd345549d64a645af0b.tar.bz2
openbsd-f957f5666c561ed19d6ccdd345549d64a645af0b.zip
Deassert has_explicit_policy()
The only caller is X509_policy_check() which goes straight to error. with beck ok jsing
-rw-r--r--src/lib/libcrypto/x509/x509_policy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_policy.c b/src/lib/libcrypto/x509/x509_policy.c
index b8ddef091f..4598597e04 100644
--- a/src/lib/libcrypto/x509/x509_policy.c
+++ b/src/lib/libcrypto/x509/x509_policy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_policy.c,v 1.21 2023/04/28 15:35:55 tb Exp $ */ 1/* $OpenBSD: x509_policy.c,v 1.22 2023/04/28 15:37:28 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022, Google Inc. 3 * Copyright (c) 2022, Google Inc.
4 * 4 *
@@ -778,8 +778,9 @@ has_explicit_policy(STACK_OF(X509_POLICY_LEVEL) *levels,
778 X509_POLICY_NODE *node, *parent; 778 X509_POLICY_NODE *node, *parent;
779 int num_levels, user_has_any_policy; 779 int num_levels, user_has_any_policy;
780 int i, j, k; 780 int i, j, k;
781 assert(user_policies == NULL || 781
782 sk_ASN1_OBJECT_is_sorted(user_policies)); 782 if (!sk_ASN1_OBJECT_is_sorted(user_policies))
783 return 0;
783 784
784 /* Step (g.i). If the policy graph is empty, the intersection is empty. */ 785 /* Step (g.i). If the policy graph is empty, the intersection is empty. */
785 num_levels = sk_X509_POLICY_LEVEL_num(levels); 786 num_levels = sk_X509_POLICY_LEVEL_num(levels);