[openssh-commits] [openssh] 01/01: unbreak fuzzer support for recent ssh-sk.h changes
git+noreply at mindrot.org
git+noreply at mindrot.org
Wed Jan 22 10:30:44 AEDT 2020
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 47160e1de8c2f638f0ef41cef42c976417b61778
Author: Damien Miller <djm at mindrot.org>
Date: Wed Jan 22 10:30:13 2020 +1100
unbreak fuzzer support for recent ssh-sk.h changes
---
regress/misc/fuzz-harness/Makefile | 27 ++++++++++++++-------------
regress/misc/fuzz-harness/ssh-sk-null.cc | 23 ++++++++++++-----------
2 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/regress/misc/fuzz-harness/Makefile b/regress/misc/fuzz-harness/Makefile
index f02d6858..64fbdbab 100644
--- a/regress/misc/fuzz-harness/Makefile
+++ b/regress/misc/fuzz-harness/Makefile
@@ -3,9 +3,10 @@ CXX=clang++-6.0
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 @@ all: $(TARGETS)
.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 de9a889f..199af112 100644
--- a/regress/misc/fuzz-harness/ssh-sk-null.cc
+++ b/regress/misc/fuzz-harness/ssh-sk-null.cc
@@ -25,7 +25,16 @@ extern "C" {
#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 @@ sshsk_sign(const char *provider, struct sshkey *key,
}
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;
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list