summaryrefslogtreecommitdiff
path: root/src/libcharon/plugins/load_tester
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/plugins/load_tester')
-rw-r--r--src/libcharon/plugins/load_tester/Makefile.in2
-rw-r--r--src/libcharon/plugins/load_tester/load_tester_creds.c34
2 files changed, 22 insertions, 14 deletions
diff --git a/src/libcharon/plugins/load_tester/Makefile.in b/src/libcharon/plugins/load_tester/Makefile.in
index c6e17fb83..c55e3578c 100644
--- a/src/libcharon/plugins/load_tester/Makefile.in
+++ b/src/libcharon/plugins/load_tester/Makefile.in
@@ -368,6 +368,7 @@ docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
fips_mode = @fips_mode@
+fuzz_plugins = @fuzz_plugins@
gtk_CFLAGS = @gtk_CFLAGS@
gtk_LIBS = @gtk_LIBS@
host = @host@
@@ -390,6 +391,7 @@ json_CFLAGS = @json_CFLAGS@
json_LIBS = @json_LIBS@
libdir = @libdir@
libexecdir = @libexecdir@
+libfuzzer = @libfuzzer@
libiptc_CFLAGS = @libiptc_CFLAGS@
libiptc_LIBS = @libiptc_LIBS@
linux_headers = @linux_headers@
diff --git a/src/libcharon/plugins/load_tester/load_tester_creds.c b/src/libcharon/plugins/load_tester/load_tester_creds.c
index 2f482962a..2cedd130e 100644
--- a/src/libcharon/plugins/load_tester/load_tester_creds.c
+++ b/src/libcharon/plugins/load_tester/load_tester_creds.c
@@ -395,22 +395,28 @@ METHOD(credential_set_t, create_cert_enumerator, enumerator_t*,
return NULL;
}
-/**
- * Filter function for shared keys, returning ID matches
- */
-static bool shared_filter(void *null, shared_key_t **in, shared_key_t **out,
- void **un1, id_match_t *me, void **un2, id_match_t *other)
+CALLBACK(shared_filter, bool,
+ void *null, enumerator_t *orig, va_list args)
{
- *out = *in;
- if (me)
- {
- *me = ID_MATCH_ANY;
- }
- if (other)
+ shared_key_t *key, **out;
+ id_match_t *me, *other;
+
+ VA_ARGS_VGET(args, out, me, other);
+
+ if (orig->enumerate(orig, &key))
{
- *other = ID_MATCH_ANY;
+ *out = key;
+ if (me)
+ {
+ *me = ID_MATCH_ANY;
+ }
+ if (other)
+ {
+ *other = ID_MATCH_ANY;
+ }
+ return TRUE;
}
- return TRUE;
+ return FALSE;
}
METHOD(credential_set_t, create_shared_enumerator, enumerator_t*,
@@ -431,7 +437,7 @@ METHOD(credential_set_t, create_shared_enumerator, enumerator_t*,
return NULL;
}
return enumerator_create_filter(enumerator_create_single(shared, NULL),
- (void*)shared_filter, NULL, NULL);
+ shared_filter, NULL, NULL);
}
METHOD(load_tester_creds_t, destroy, void,