- OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
-
- if (store != NULL)
- return ossl_method_store_merge_global_properties(store, propq);
- EVPerr(0, ERR_R_INTERNAL_ERROR);
- return 0;
+ OSSL_PROPERTY_LIST **plp = ossl_ctx_global_properties(libctx);
+ OSSL_PROPERTY_LIST *pl1, *pl2;
+
+ if (propq == NULL)
+ return 1;
+ if (plp == NULL || *plp == NULL)
+ return EVP_set_default_properties(libctx, propq);
+ if ((pl1 = ossl_parse_query(libctx, propq)) == NULL) {
+ EVPerr(0, EVP_R_DEFAULT_QUERY_PARSE_ERROR);
+ return 0;
+ }
+ pl2 = ossl_property_merge(pl1, *plp);
+ ossl_property_free(pl1);
+ if (pl2 == NULL) {
+ EVPerr(0, ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
+ return evp_set_default_properties(libctx, pl2);