Lines Matching defs:libctx
36 static int test_provider(OSSL_LIB_CTX **libctx, const char *name,
57 EVP_set_default_properties(*libctx, "fips=yes");
62 if (!TEST_ptr(base = OSSL_PROVIDER_load(*libctx, "base")))
64 if (!TEST_ptr(prov = OSSL_PROVIDER_load(*libctx, name)))
71 EVP_set_default_properties(*libctx, "");
84 EVP_set_default_properties(*libctx, "fips=yes");
88 EVP_set_default_properties(*libctx, "");
106 /* Legacy provider should also be unloaded from child libctx */
112 * the child libctx. Loading and unloading the default provider should
116 legacy = OSSL_PROVIDER_load(*libctx, "legacy");
117 deflt = OSSL_PROVIDER_load(*libctx, "default");
119 || !TEST_true(OSSL_PROVIDER_available(*libctx, "default")))
124 || !TEST_false(OSSL_PROVIDER_available(*libctx, "default"))
140 * We must free the libctx to force the provider to really be unloaded from
143 OSSL_LIB_CTX_free(*libctx);
144 *libctx = NULL;
155 OSSL_LIB_CTX_free(*libctx);
156 *libctx = NULL;
162 OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new();
167 TEST_ptr(libctx)
168 && TEST_true(OSSL_PROVIDER_add_builtin(libctx, name,
170 && test_provider(&libctx, name, NULL);
172 OSSL_LIB_CTX_free(libctx);
181 OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new();
185 if (!TEST_ptr(libctx))
188 legacy = OSSL_PROVIDER_load(libctx, "legacy");
194 OSSL_LIB_CTX_free(libctx);
198 if (!TEST_true(OSSL_PROVIDER_add_builtin(libctx, name,
201 OSSL_LIB_CTX_free(libctx);
205 /* test_provider will free libctx and unload legacy as part of the test */
206 return test_provider(&libctx, name, legacy);
213 OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new();
216 if (!TEST_ptr(libctx))
219 /* test_provider will free libctx as part of the test */
220 return test_provider(&libctx, name, NULL);