Attempting to fetch one of the above and providing a query string was
failing with an internal assertion error. We must ensure that we give the
provider when calling ossl_method_store_cache_set()
Fixes #17456
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17459)
construct_decoder,
destruct_decoder
};
construct_decoder,
destruct_decoder
};
+ OSSL_PROVIDER *prov = NULL;
methdata->id = id;
methdata->names = name;
methdata->propquery = properties;
methdata->flag_construct_error_occurred = 0;
if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_DECODER,
methdata->id = id;
methdata->names = name;
methdata->propquery = properties;
methdata->flag_construct_error_occurred = 0;
if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_DECODER,
- NULL, 0 /* !force_cache */,
+ &prov, 0 /* !force_cache */,
&mcm, methdata)) != NULL) {
/*
* If construction did create a method for us, we know that
&mcm, methdata)) != NULL) {
/*
* If construction did create a method for us, we know that
if (id == 0 && name != NULL)
id = ossl_namemap_name2num(namemap, name);
if (id != 0)
if (id == 0 && name != NULL)
id = ossl_namemap_name2num(namemap, name);
if (id != 0)
- ossl_method_store_cache_set(store, NULL, id, properties, method,
+ ossl_method_store_cache_set(store, prov, id, properties, method,
up_ref_decoder, free_decoder);
}
up_ref_decoder, free_decoder);
}
construct_encoder,
destruct_encoder
};
construct_encoder,
destruct_encoder
};
+ OSSL_PROVIDER *prov = NULL;
methdata->id = id;
methdata->names = name;
methdata->propquery = properties;
methdata->flag_construct_error_occurred = 0;
if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_ENCODER,
methdata->id = id;
methdata->names = name;
methdata->propquery = properties;
methdata->flag_construct_error_occurred = 0;
if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_ENCODER,
- NULL, 0 /* !force_cache */,
+ &prov, 0 /* !force_cache */,
&mcm, methdata)) != NULL) {
/*
* If construction did create a method for us, we know that
&mcm, methdata)) != NULL) {
/*
* If construction did create a method for us, we know that
*/
if (id == 0)
id = ossl_namemap_name2num(namemap, name);
*/
if (id == 0)
id = ossl_namemap_name2num(namemap, name);
- ossl_method_store_cache_set(store, NULL, id, properties, method,
+ ossl_method_store_cache_set(store, prov, id, properties, method,
up_ref_encoder, free_encoder);
}
up_ref_encoder, free_encoder);
}
construct_loader,
destruct_loader
};
construct_loader,
destruct_loader
};
+ OSSL_PROVIDER *prov = NULL;
methdata->scheme_id = id;
methdata->scheme = scheme;
methdata->propquery = properties;
methdata->flag_construct_error_occurred = 0;
if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_STORE,
methdata->scheme_id = id;
methdata->scheme = scheme;
methdata->propquery = properties;
methdata->flag_construct_error_occurred = 0;
if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_STORE,
- NULL, 0 /* !force_cache */,
+ &prov, 0 /* !force_cache */,
&mcm, methdata)) != NULL) {
/*
* If construction did create a method for us, we know that there
&mcm, methdata)) != NULL) {
/*
* If construction did create a method for us, we know that there
*/
if (id == 0)
id = ossl_namemap_name2num(namemap, scheme);
*/
if (id == 0)
id = ossl_namemap_name2num(namemap, scheme);
- ossl_method_store_cache_set(store, NULL, id, properties, method,
+ ossl_method_store_cache_set(store, prov, id, properties, method,
up_ref_loader, free_loader);
}
up_ref_loader, free_loader);
}