- /* Cache the input type for this decoder */
- params[0] =
- OSSL_PARAM_construct_utf8_ptr(OSSL_DECODER_PARAM_INPUT_TYPE,
- (char **)&decoder_inst->input_type, 0);
- params[1] =
- OSSL_PARAM_construct_utf8_ptr(OSSL_DECODER_PARAM_INPUT_STRUCTURE,
- (char **)&decoder_inst->input_structure,
- 0);
- params[2] = OSSL_PARAM_construct_end();
-
- if (!decoder->get_params(params)
- || !OSSL_PARAM_modified(¶ms[0]))
+ prov = OSSL_DECODER_get0_provider(decoder);
+ libctx = ossl_provider_libctx(prov);
+ props = ossl_decoder_parsed_properties(decoder);
+ if (props == NULL) {
+ ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
+ "there are no property definitions with decoder %s",
+ OSSL_DECODER_get0_name(decoder));
+ goto err;
+ }
+
+ /* The "input" property is mandatory */
+ prop = ossl_property_find_property(props, libctx, "input");
+ decoder_inst->input_type = ossl_property_get_string_value(libctx, prop);
+ if (decoder_inst->input_type == NULL) {
+ ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
+ "the mandatory 'input' property is missing "
+ "for decoder %s (properties: %s)",
+ OSSL_DECODER_get0_name(decoder),
+ OSSL_DECODER_get0_properties(decoder));