summaryrefslogtreecommitdiff
path: root/thirdparty/openssl/crypto/x509v3/pcy_tree.c
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-01-13 13:39:08 +0100
committerRémi Verschelde <rverschelde@gmail.com>2018-01-13 13:39:08 +0100
commit00abb1f201cbe1e40c2eef30819be115d3d04d10 (patch)
tree7eb36871dd7af02db7d2f59482644a56bc79d7bb /thirdparty/openssl/crypto/x509v3/pcy_tree.c
parentde0b31edd5b36b8c8016b7ca50c1823f2efbfa74 (diff)
openssl: Update to pristine 1.0.2n (security update)
Diffstat (limited to 'thirdparty/openssl/crypto/x509v3/pcy_tree.c')
-rw-r--r--thirdparty/openssl/crypto/x509v3/pcy_tree.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/thirdparty/openssl/crypto/x509v3/pcy_tree.c b/thirdparty/openssl/crypto/x509v3/pcy_tree.c
index 09b8691c86..03c9533bcc 100644
--- a/thirdparty/openssl/crypto/x509v3/pcy_tree.c
+++ b/thirdparty/openssl/crypto/x509v3/pcy_tree.c
@@ -732,6 +732,7 @@ int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
STACK_OF(ASN1_OBJECT) *policy_oids, unsigned int flags)
{
int ret;
+ int calc_ret;
X509_POLICY_TREE *tree = NULL;
STACK_OF(X509_POLICY_NODE) *nodes, *auth_nodes = NULL;
*ptree = NULL;
@@ -800,17 +801,20 @@ int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,
/* Tree is not empty: continue */
- ret = tree_calculate_authority_set(tree, &auth_nodes);
+ calc_ret = tree_calculate_authority_set(tree, &auth_nodes);
- if (!ret)
+ if (!calc_ret)
goto error;
- if (!tree_calculate_user_set(tree, policy_oids, auth_nodes))
- goto error;
+ ret = tree_calculate_user_set(tree, policy_oids, auth_nodes);
- if (ret == 2)
+ if (calc_ret == 2)
sk_X509_POLICY_NODE_free(auth_nodes);
+ if (!ret)
+ goto error;
+
+
if (tree)
*ptree = tree;