Skip to content

Commit

Permalink
We can't check policy if we got an empty stack of certs
Browse files Browse the repository at this point in the history
  • Loading branch information
beldmit committed Aug 14, 2024
1 parent 12ba471 commit e4a1a35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/x509/pcy_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ static int tree_init(X509_POLICY_TREE **ptree, STACK_OF(X509) *certs,

*ptree = NULL;

if (n < 0)
return X509_PCY_TREE_INTERNAL;
/* Can't do anything with just a trust anchor */
if (n == 0)
return X509_PCY_TREE_EMPTY;
Expand Down

0 comments on commit e4a1a35

Please sign in to comment.