unbreak fuzzer support for recent ssh-sk.h changes
diff --git a/regress/misc/fuzz-harness/Makefile b/regress/misc/fuzz-harness/Makefile
index f02d685..64fbdba 100644
--- a/regress/misc/fuzz-harness/Makefile
+++ b/regress/misc/fuzz-harness/Makefile
@@ -3,9 +3,10 @@
FUZZ_FLAGS=-fsanitize=address,undefined -fsanitize-coverage=edge,trace-pc
FUZZ_LIBS=-lFuzzer
-CXXFLAGS=-O2 -g -Wall -Wextra -I ../../.. $(FUZZ_FLAGS)
+CXXFLAGS=-O2 -g -Wall -Wextra -Wno-unused-parameter -I ../../.. $(FUZZ_FLAGS)
LDFLAGS=-L ../../.. -L ../../../openbsd-compat -g $(FUZZ_FLAGS)
LIBS=-lssh -lopenbsd-compat -lcrypto -lfido2 -lcbor $(FUZZ_LIBS)
+COMMON_OBJS=ssh-sk-null.o
TARGETS=pubkey_fuzz sig_fuzz authopt_fuzz sshsig_fuzz \
sshsigopt_fuzz privkey_fuzz
@@ -15,23 +16,23 @@
.cc.o:
$(CXX) $(CXXFLAGS) -c $< -o $@
-pubkey_fuzz: pubkey_fuzz.o
- $(CXX) -o $@ pubkey_fuzz.o $(LDFLAGS) $(LIBS)
+pubkey_fuzz: pubkey_fuzz.o $(COMMON_OBJS)
+ $(CXX) -o $@ pubkey_fuzz.o $(COMMON_OBJS) $(LDFLAGS) $(LIBS)
-sig_fuzz: sig_fuzz.o
- $(CXX) -o $@ sig_fuzz.o $(LDFLAGS) $(LIBS)
+sig_fuzz: sig_fuzz.o $(COMMON_OBJS)
+ $(CXX) -o $@ sig_fuzz.o $(COMMON_OBJS) $(LDFLAGS) $(LIBS)
-authopt_fuzz: authopt_fuzz.o
- $(CXX) -o $@ authopt_fuzz.o ../../../auth-options.o $(LDFLAGS) $(LIBS)
+authopt_fuzz: authopt_fuzz.o $(COMMON_OBJS)
+ $(CXX) -o $@ authopt_fuzz.o $(COMMON_OBJS) ../../../auth-options.o $(LDFLAGS) $(LIBS)
-sshsig_fuzz: sshsig_fuzz.o
- $(CXX) -o $@ sshsig_fuzz.o ../../../sshsig.o $(LDFLAGS) $(LIBS)
+sshsig_fuzz: sshsig_fuzz.o $(COMMON_OBJS)
+ $(CXX) -o $@ sshsig_fuzz.o $(COMMON_OBJS) ../../../sshsig.o $(LDFLAGS) $(LIBS)
-sshsigopt_fuzz: sshsigopt_fuzz.o
- $(CXX) -o $@ sshsigopt_fuzz.o ../../../sshsig.o $(LDFLAGS) $(LIBS)
+sshsigopt_fuzz: sshsigopt_fuzz.o $(COMMON_OBJS)
+ $(CXX) -o $@ sshsigopt_fuzz.o $(COMMON_OBJS) ../../../sshsig.o $(LDFLAGS) $(LIBS)
-privkey_fuzz: privkey_fuzz.o
- $(CXX) -o $@ privkey_fuzz.o $(LDFLAGS) $(LIBS)
+privkey_fuzz: privkey_fuzz.o $(COMMON_OBJS)
+ $(CXX) -o $@ privkey_fuzz.o $(COMMON_OBJS) $(LDFLAGS) $(LIBS)
clean:
-rm -f *.o $(TARGETS)
diff --git a/regress/misc/fuzz-harness/ssh-sk-null.cc b/regress/misc/fuzz-harness/ssh-sk-null.cc
index de9a889..199af11 100644
--- a/regress/misc/fuzz-harness/ssh-sk-null.cc
+++ b/regress/misc/fuzz-harness/ssh-sk-null.cc
@@ -25,7 +25,16 @@
#include "ssh-sk.h"
int
-sshsk_sign(const char *provider, struct sshkey *key,
+sshsk_enroll(int type, const char *provider_path, const char *device,
+ const char *application, const char *userid, uint8_t flags,
+ const char *pin, struct sshbuf *challenge_buf,
+ struct sshkey **keyp, struct sshbuf *attest)
+{
+ return SSH_ERR_FEATURE_UNSUPPORTED;
+}
+
+int
+sshsk_sign(const char *provider_path, struct sshkey *key,
u_char **sigp, size_t *lenp, const u_char *data, size_t datalen,
u_int compat, const char *pin)
{
@@ -33,16 +42,8 @@
}
int
-sshsk_enroll(int type, const char *provider_path, const char *application,
- uint8_t flags, const char *pin, struct sshbuf *challenge_buf,
- struct sshkey **keyp, struct sshbuf *attest)
-{
- return SSH_ERR_FEATURE_UNSUPPORTED;
-}
-
-int
-sshsk_load_resident(const char *provider_path, const char *pin,
- struct sshkey ***keysp, size_t *nkeysp)
+sshsk_load_resident(const char *provider_path, const char *device,
+ const char *pin, struct sshkey ***keysp, size_t *nkeysp)
{
return SSH_ERR_FEATURE_UNSUPPORTED;
}