<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/edc847ceea8a51a37e70ca75abaf5dc9617694bf">https://github.com/macports/macports-ports/commit/edc847ceea8a51a37e70ca75abaf5dc9617694bf</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit edc847ceea8a51a37e70ca75abaf5dc9617694bf
</span>Author: Clemens Lang <cal@macports.org>
AuthorDate: Thu Mar 23 11:33:48 2023 +0100
<span style='display:block; white-space:pre;color:#404040;'> openssl11: Fix CVE-2023-0464
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> See https://www.openssl.org/news/secadv/20230322.txt for the advisory.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> CVE: CVE-2023-0464
</span>---
devel/openssl11/Portfile | 4 +-
.../879f7080d7e141f415c79eaa3a8ac4a3dad0348b.patch | 220 +++++++++++++++++++++
2 files changed, 223 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/openssl11/Portfile b/devel/openssl11/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index c9ba7569b0d..eef09a0d28d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/openssl11/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/openssl11/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -7,7 +7,7 @@ set short_v 1.1
</span> name openssl[string map {. {}} $short_v]
version ${short_v}.1t
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span>
categories devel security
platforms darwin
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -42,6 +42,8 @@ checksums rmd160 bcb4cb92dd2518de8b02a5a69bfcc0e7e3df8086 \
</span> sha256 8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b \
size 9881866
<span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles 879f7080d7e141f415c79eaa3a8ac4a3dad0348b.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> platform darwin 8 {
# No Availability.h on Tiger
patchfiles-append patch-crypto-rand-tiger.diff
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/openssl11/files/879f7080d7e141f415c79eaa3a8ac4a3dad0348b.patch b/devel/openssl11/files/879f7080d7e141f415c79eaa3a8ac4a3dad0348b.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..d12a10a9656
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/openssl11/files/879f7080d7e141f415c79eaa3a8ac4a3dad0348b.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,220 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 879f7080d7e141f415c79eaa3a8ac4a3dad0348b Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Pauli <pauli@openssl.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Wed, 8 Mar 2023 15:28:20 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] x509: excessive resource use verifying policy constraints
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+A security vulnerability has been identified in all supported versions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+of OpenSSL related to the verification of X.509 certificate chains
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+that include policy constraints. Attackers may be able to exploit this
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+vulnerability by creating a malicious certificate chain that triggers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+exponential use of computational resources, leading to a denial-of-service
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+(DoS) attack on affected systems.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Fixes CVE-2023-0464
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Reviewed-by: Tomas Mraz <tomas@openssl.org>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+(Merged from https://github.com/openssl/openssl/pull/20569)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Upstream-Status: Backport [https://github.com/openssl/openssl/commit/879f7080d7e141f415c79eaa3a8ac4a3dad0348b]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ crypto/x509v3/pcy_local.h | 8 +++++++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ crypto/x509v3/pcy_node.c | 12 +++++++++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ crypto/x509v3/pcy_tree.c | 37 +++++++++++++++++++++++++++----------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 3 files changed, 43 insertions(+), 14 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/crypto/x509v3/pcy_local.h b/crypto/x509v3/pcy_local.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5daf78de4585..344aa067659c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./crypto/x509v3/pcy_local.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./crypto/x509v3/pcy_local.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -111,6 +111,11 @@ struct X509_POLICY_LEVEL_st {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct X509_POLICY_TREE_st {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The number of nodes in the tree */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ size_t node_count;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* The maximum number of nodes in the tree */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ size_t node_maximum;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* This is the tree 'level' data */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_LEVEL *levels;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int nlevel;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -159,7 +164,8 @@ X509_POLICY_NODE *tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_DATA *data,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_NODE *parent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- X509_POLICY_TREE *tree);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ X509_POLICY_TREE *tree,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int extra_data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void policy_node_free(X509_POLICY_NODE *node);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int policy_node_match(const X509_POLICY_LEVEL *lvl,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const X509_POLICY_NODE *node, const ASN1_OBJECT *oid);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/crypto/x509v3/pcy_node.c b/crypto/x509v3/pcy_node.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e2d7b1532236..d574fb9d665d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./crypto/x509v3/pcy_node.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./crypto/x509v3/pcy_node.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -59,10 +59,15 @@ X509_POLICY_NODE *level_find_node(const X509_POLICY_LEVEL *level,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_DATA *data,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_NODE *parent,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- X509_POLICY_TREE *tree)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ X509_POLICY_TREE *tree,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int extra_data)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_NODE *node;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Verify that the tree isn't too large. This mitigates CVE-2023-0464 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (tree->node_maximum > 0 && tree->node_count >= tree->node_maximum)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ node = OPENSSL_zalloc(sizeof(*node));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (node == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509V3err(X509V3_F_LEVEL_ADD_NODE, ERR_R_MALLOC_FAILURE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -70,7 +75,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ node->data = data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ node->parent = parent;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (level) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (level != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (OBJ_obj2nid(data->valid_policy) == NID_any_policy) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (level->anyPolicy)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto node_error;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -90,7 +95,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (tree) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (extra_data) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (tree->extra_data == NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tree->extra_data = sk_X509_POLICY_DATA_new_null();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (tree->extra_data == NULL){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -103,6 +108,7 @@ X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tree->node_count++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (parent)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ parent->nchild++;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/crypto/x509v3/pcy_tree.c b/crypto/x509v3/pcy_tree.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 6e8322cbc5e3..6c7fd3540500 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./crypto/x509v3/pcy_tree.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./crypto/x509v3/pcy_tree.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13,6 +13,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "pcy_local.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * If the maximum number of nodes in the policy tree isn't defined, set it to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * a generous default of 1000 nodes.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Defining this to be zero means unlimited policy tree growth which opens the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * door on CVE-2023-0464.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef OPENSSL_POLICY_TREE_NODES_MAX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define OPENSSL_POLICY_TREE_NODES_MAX 1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Enable this to print out the complete policy tree at various point during
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * evaluation.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -168,6 +180,9 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return X509_PCY_TREE_INTERNAL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Limit the growth of the tree to mitigate CVE-2023-0464 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tree->node_maximum = OPENSSL_POLICY_TREE_NODES_MAX;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * http://tools.ietf.org/html/rfc5280#section-6.1.2, figure 3.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -184,7 +199,7 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ level = tree->levels;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((data = policy_data_new(NULL, OBJ_nid2obj(NID_any_policy), 0)) == NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto bad_tree;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (level_add_node(level, data, NULL, tree) == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (level_add_node(level, data, NULL, tree, 1) == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ policy_data_free(data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto bad_tree;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -243,7 +258,8 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Return value: 1 on success, 0 otherwise
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- X509_POLICY_DATA *data)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ X509_POLICY_DATA *data,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ X509_POLICY_TREE *tree)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_LEVEL *last = curr - 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int i, matched = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -253,13 +269,13 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_NODE *node = sk_X509_POLICY_NODE_value(last->nodes, i);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (policy_node_match(last, node, data->valid_policy)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (level_add_node(curr, data, node, NULL) == NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (level_add_node(curr, data, node, tree, 0) == NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ matched = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!matched && last->anyPolicy) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (level_add_node(curr, data, last->anyPolicy, NULL) == NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (level_add_node(curr, data, last->anyPolicy, tree, 0) == NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -272,7 +288,8 @@ static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Return value: 1 on success, 0 otherwise.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int tree_link_nodes(X509_POLICY_LEVEL *curr,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const X509_POLICY_CACHE *cache)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const X509_POLICY_CACHE *cache,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ X509_POLICY_TREE *tree)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int i;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -280,7 +297,7 @@ static int tree_link_nodes(X509_POLICY_LEVEL *curr,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ X509_POLICY_DATA *data = sk_X509_POLICY_DATA_value(cache->data, i);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Look for matching nodes in previous level */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (!tree_link_matching_nodes(curr, data))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!tree_link_matching_nodes(curr, data, tree))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -311,7 +328,7 @@ static int tree_add_unmatched(X509_POLICY_LEVEL *curr,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Curr may not have anyPolicy */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ data->qualifier_set = cache->anyPolicy->qualifier_set;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ data->flags |= POLICY_DATA_FLAG_SHARED_QUALIFIERS;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (level_add_node(curr, data, node, tree) == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (level_add_node(curr, data, node, tree, 1) == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ policy_data_free(data);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -373,7 +390,7 @@ static int tree_link_any(X509_POLICY_LEVEL *curr,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Finally add link to anyPolicy */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (last->anyPolicy &&
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- level_add_node(curr, cache->anyPolicy, last->anyPolicy, NULL) == NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ level_add_node(curr, cache->anyPolicy, last->anyPolicy, tree, 0) == NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -555,7 +572,7 @@ static int tree_calculate_user_set(X509_POLICY_TREE *tree,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extra->qualifier_set = anyPolicy->data->qualifier_set;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extra->flags = POLICY_DATA_FLAG_SHARED_QUALIFIERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | POLICY_DATA_FLAG_EXTRA_NODE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- node = level_add_node(NULL, extra, anyPolicy->parent, tree);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ node = level_add_node(NULL, extra, anyPolicy->parent, tree, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!tree->user_policies) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tree->user_policies = sk_X509_POLICY_NODE_new_null();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -582,7 +599,7 @@ static int tree_evaluate(X509_POLICY_TREE *tree)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (i = 1; i < tree->nlevel; i++, curr++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cache = policy_cache_set(curr->cert);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (!tree_link_nodes(curr, cache))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!tree_link_nodes(curr, cache, tree))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return X509_PCY_TREE_INTERNAL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!(curr->flags & X509_V_FLAG_INHIBIT_ANY)
</span></pre><pre style='margin:0'>
</pre>