OPENSSL_sk_num returns an integer which can theoretically be negative.
Assigning this to a size_t and using it as a loop bound isn't ideal.
Rather than adding checked for NULL or negative returns, changing the loop
index and end to int is simpler.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17954)
{
struct collect_data_st *data = arg;
STACK_OF(EVP_KEYMGMT) *keymgmts = data->keymgmts;
- size_t i, end_i;
+ int i, end_i;
EVP_KEYMGMT *keymgmt;
const OSSL_PROVIDER *prov;
void *provctx;