mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
We can't check policy if we got an empty stack of certs
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/25186)
This commit is contained in:
parent
7c3c7374ce
commit
8d28402ce3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user