#include "testutil.h"
#include "internal/nelem.h"
#include "internal/property.h"
-#include "../crypto/property/property_lcl.h"
+#include "../crypto/property/property_local.h"
static int add_property_names(const char *n, ...)
{
return res;
}
+static int up_ref(void *p)
+{
+ return 1;
+}
+
+static void down_ref(void *p)
+{
+}
+
static int test_property_string(void)
{
OSSL_METHOD_STORE *store;
goto err;
for (i = 0; i < OSSL_NELEM(impls); i++)
- if (!TEST_true(ossl_method_store_add(store, impls[i].nid, impls[i].prop,
- impls[i].impl, NULL))) {
+ if (!TEST_true(ossl_method_store_add(store, NULL, impls[i].nid,
+ impls[i].prop, impls[i].impl,
+ &up_ref, &down_ref))) {
TEST_note("iteration %zd", i + 1);
goto err;
}
goto err;
for (i = 0; i < OSSL_NELEM(impls); i++)
- if (!TEST_true(ossl_method_store_add(store, impls[i].nid, impls[i].prop,
- impls[i].impl, NULL))) {
+ if (!TEST_true(ossl_method_store_add(store, NULL, impls[i].nid,
+ impls[i].prop, impls[i].impl,
+ &up_ref, &down_ref))) {
TEST_note("iteration %zd", i + 1);
goto err;
}
for (i = 1; i <= max; i++) {
v[i] = 2 * i;
BIO_snprintf(buf, sizeof(buf), "n=%d\n", i);
- if (!TEST_true(ossl_method_store_add(store, i, buf, "abc", NULL))
- || !TEST_true(ossl_method_store_cache_set(store, i, buf, v + i))
+ if (!TEST_true(ossl_method_store_add(store, NULL, i, buf, "abc",
+ &up_ref, &down_ref))
+ || !TEST_true(ossl_method_store_cache_set(store, i, buf, v + i,
+ &up_ref, &down_ref))
|| !TEST_true(ossl_method_store_cache_set(store, i, "n=1234",
- "miss"))) {
+ "miss", &up_ref,
+ &down_ref))) {
TEST_note("iteration %d", i);
goto err;
}