diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-28 15:21:23 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-28 15:21:23 +0000 |
commit | 0711891098924fa1b798d283c2b5778c814ea032 (patch) | |
tree | 9ae522b0477bb0272380e2e54e8638ef7ec40a76 /lib | |
parent | 9f037dc516c780c8f375d2670a660730daf15de5 (diff) |
Deassert x509_policy_level_add_nodes()
This assert is in debugging code that ensures that there are no duplicate
nodes on this level. This is an expensive and unnecessary check. Duplicates
already cause failures as ensured by regress.
with beck
ok jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/x509/x509_policy.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/libcrypto/x509/x509_policy.c b/lib/libcrypto/x509/x509_policy.c index c8f9447e4f6..0f60a11c77d 100644 --- a/lib/libcrypto/x509/x509_policy.c +++ b/lib/libcrypto/x509/x509_policy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_policy.c,v 1.17 2023/04/28 15:16:48 tb Exp $ */ +/* $OpenBSD: x509_policy.c,v 1.18 2023/04/28 15:21:22 tb Exp $ */ /* * Copyright (c) 2022, Google Inc. * @@ -319,15 +319,6 @@ x509_policy_level_add_nodes(X509_POLICY_LEVEL *level, } sk_X509_POLICY_NODE_sort(level->nodes); -#if !defined(NDEBUG) - /* There should be no duplicate nodes. */ - for (i = 1; i < sk_X509_POLICY_NODE_num(level->nodes); i++) { - assert( - OBJ_cmp( - sk_X509_POLICY_NODE_value(level->nodes, i - 1)->policy, - sk_X509_POLICY_NODE_value(level->nodes, i)->policy) != 0); - } -#endif return 1; } |