Mercurial > dropbear
comparison Makefile.in @ 1733:d529a52b2f7c coverity coverity
merge coverity from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 26 Jun 2020 21:07:34 +0800 |
parents | b59623a64678 72bb7fb1fced |
children |
comparison
equal
deleted
inserted
replaced
1643:b59623a64678 | 1733:d529a52b2f7c |
---|---|
34 dss.o bignum.o \ | 34 dss.o bignum.o \ |
35 signkey.o rsa.o dbrandom.o \ | 35 signkey.o rsa.o dbrandom.o \ |
36 queue.o \ | 36 queue.o \ |
37 atomicio.o compat.o fake-rfc2553.o \ | 37 atomicio.o compat.o fake-rfc2553.o \ |
38 ltc_prng.o ecc.o ecdsa.o crypto_desc.o \ | 38 ltc_prng.o ecc.o ecdsa.o crypto_desc.o \ |
39 curve25519.o ed25519.o \ | |
39 dbmalloc.o \ | 40 dbmalloc.o \ |
40 gensignkey.o gendss.o genrsa.o | 41 gensignkey.o gendss.o genrsa.o gened25519.o |
41 | 42 |
42 SVROBJS=svr-kex.o svr-auth.o sshpty.o \ | 43 SVROBJS=svr-kex.o svr-auth.o sshpty.o \ |
43 svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \ | 44 svr-authpasswd.o svr-authpubkey.o svr-authpubkeyoptions.o svr-session.o svr-service.o \ |
44 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\ | 45 svr-chansession.o svr-runopts.o svr-agentfwd.o svr-main.o svr-x11fwd.o\ |
45 svr-tcpfwd.o svr-authpam.o | 46 svr-tcpfwd.o svr-authpam.o |
50 cli-agentfwd.o | 51 cli-agentfwd.o |
51 | 52 |
52 CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \ | 53 CLISVROBJS=common-session.o packet.o common-algo.o common-kex.o \ |
53 common-channel.o common-chansession.o termcodes.o loginrec.o \ | 54 common-channel.o common-chansession.o termcodes.o loginrec.o \ |
54 tcp-accept.o listener.o process-packet.o dh_groups.o \ | 55 tcp-accept.o listener.o process-packet.o dh_groups.o \ |
55 common-runopts.o circbuffer.o curve25519-donna.o list.o netio.o | 56 common-runopts.o circbuffer.o list.o netio.o chachapoly.o gcm.o |
56 | 57 |
57 KEYOBJS=dropbearkey.o | 58 KEYOBJS=dropbearkey.o |
58 | 59 |
59 CONVERTOBJS=dropbearconvert.o keyimport.o | 60 CONVERTOBJS=dropbearconvert.o keyimport.o |
60 | 61 |
78 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS) | 79 dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS) |
79 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS) | 80 dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS) |
80 scpobjs=$(SCPOBJS) | 81 scpobjs=$(SCPOBJS) |
81 endif | 82 endif |
82 | 83 |
84 ifeq (@DROPBEAR_PLUGIN@, 1) | |
85 # rdynamic makes all the global symbols of dropbear available to all the loaded shared libraries | |
86 # this allow a plugin to reuse existing crypto/utilities like base64_decode/base64_encode without | |
87 # the need to rewrite them. | |
88 PLUGIN_LIBS=-ldl -rdynamic | |
89 else | |
90 PLUGIN_LIBS= | |
91 endif | |
92 | |
83 VPATH=@srcdir@ | 93 VPATH=@srcdir@ |
84 srcdir=@srcdir@ | 94 srcdir=@srcdir@ |
85 | 95 |
86 prefix=@prefix@ | 96 prefix=@prefix@ |
87 exec_prefix=@exec_prefix@ | 97 exec_prefix=@exec_prefix@ |
163 insmulti%: dropbearmulti$(EXEEXT) | 173 insmulti%: dropbearmulti$(EXEEXT) |
164 $(INSTALL) -d $(DESTDIR)$(bindir) | 174 $(INSTALL) -d $(DESTDIR)$(bindir) |
165 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT) | 175 -rm -f $(DESTDIR)$(bindir)/$*$(EXEEXT) |
166 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT) | 176 -ln -s $(bindir)/dropbearmulti$(EXEEXT) $(DESTDIR)$(bindir)/$*$(EXEEXT) |
167 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 | 177 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
168 if test -e $*.1; then $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi | 178 if test -e $(srcdir)/$*.1; then $(INSTALL) -m 644 $(srcdir)/$*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi |
169 | 179 |
170 # dropbear should go in sbin, so it needs a separate rule | 180 # dropbear should go in sbin, so it needs a separate rule |
171 inst_dropbear: dropbear | 181 inst_dropbear: dropbear |
172 $(INSTALL) -d $(DESTDIR)$(sbindir) | 182 $(INSTALL) -d $(DESTDIR)$(sbindir) |
173 $(INSTALL) dropbear$(EXEEXT) $(DESTDIR)$(sbindir) | 183 $(INSTALL) dropbear$(EXEEXT) $(DESTDIR)$(sbindir) |
176 | 186 |
177 inst_%: % | 187 inst_%: % |
178 $(INSTALL) -d $(DESTDIR)$(bindir) | 188 $(INSTALL) -d $(DESTDIR)$(bindir) |
179 $(INSTALL) $*$(EXEEXT) $(DESTDIR)$(bindir) | 189 $(INSTALL) $*$(EXEEXT) $(DESTDIR)$(bindir) |
180 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 | 190 $(INSTALL) -d $(DESTDIR)$(mandir)/man1 |
181 if test -e $*.1; then $(INSTALL) -m 644 $*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi | 191 if test -e $(srcdir)/$*.1; then $(INSTALL) -m 644 $(srcdir)/$*.1 $(DESTDIR)$(mandir)/man1/$*.1; fi |
182 | 192 |
183 inst_dropbearmulti: $(addprefix insmulti, $(PROGRAMS)) | 193 inst_dropbearmulti: $(addprefix insmulti, $(PROGRAMS)) |
184 | 194 |
185 # for some reason the rule further down doesn't like $($@objs) as a prereq. | 195 # for some reason the rule further down doesn't like $($@objs) as a prereq. |
186 dropbear: $(dropbearobjs) | 196 dropbear: $(dropbearobjs) |
187 dbclient: $(dbclientobjs) | 197 dbclient: $(dbclientobjs) |
188 dropbearkey: $(dropbearkeyobjs) | 198 dropbearkey: $(dropbearkeyobjs) |
189 dropbearconvert: $(dropbearconvertobjs) | 199 dropbearconvert: $(dropbearconvertobjs) |
190 | 200 |
191 dropbear: $(HEADERS) $(LIBTOM_DEPS) Makefile | 201 dropbear: $(HEADERS) $(LIBTOM_DEPS) Makefile |
192 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) @CRYPTLIB@ | 202 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) @CRYPTLIB@ $(PLUGIN_LIBS) |
193 | 203 |
194 dbclient: $(HEADERS) $(LIBTOM_DEPS) Makefile | 204 dbclient: $(HEADERS) $(LIBTOM_DEPS) Makefile |
195 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) | 205 $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBTOM_LIBS) $(LIBS) |
196 | 206 |
197 dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile | 207 dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile |
224 $(MAKE) -C libtomcrypt | 234 $(MAKE) -C libtomcrypt |
225 | 235 |
226 $(STATIC_LTM): $(OPTION_HEADERS) | 236 $(STATIC_LTM): $(OPTION_HEADERS) |
227 $(MAKE) -C libtommath | 237 $(MAKE) -C libtommath |
228 | 238 |
229 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean | 239 .PHONY : clean sizes thisclean distclean tidy ltc-clean ltm-clean lint |
230 | 240 |
231 ltc-clean: | 241 ltc-clean: |
232 $(MAKE) -C libtomcrypt clean | 242 $(MAKE) -C libtomcrypt clean |
233 | 243 |
234 ltm-clean: | 244 ltm-clean: |
250 -rm -f default_options_guard.h | 260 -rm -f default_options_guard.h |
251 | 261 |
252 tidy: | 262 tidy: |
253 -rm -f *~ *.gcov */*~ | 263 -rm -f *~ *.gcov */*~ |
254 | 264 |
265 lint: | |
266 cd $(srcdir); ./dropbear_lint.sh | |
267 | |
255 ## Fuzzing targets | 268 ## Fuzzing targets |
256 | 269 |
257 # list of fuzz targets | 270 # list of fuzz targets |
258 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths fuzzer-kexdh fuzzer-kexecdh | 271 FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey fuzzer-verify fuzzer-preauth_nomaths fuzzer-kexdh fuzzer-kexecdh fuzzer-kexcurve25519 |
259 | 272 |
260 FUZZER_OPTIONS = $(addsuffix .options, $(FUZZ_TARGETS)) | 273 FUZZER_OPTIONS = $(addsuffix .options, $(FUZZ_TARGETS)) |
261 | 274 |
262 list-fuzz-targets: | 275 list-fuzz-targets: |
263 @echo $(FUZZ_TARGETS) | 276 @echo $(FUZZ_TARGETS) |
266 fuzzstandalone: FUZZLIB=fuzz-harness.o | 279 fuzzstandalone: FUZZLIB=fuzz-harness.o |
267 fuzzstandalone: fuzz-harness.o fuzz-targets | 280 fuzzstandalone: fuzz-harness.o fuzz-targets |
268 | 281 |
269 # exclude svr-main.o to avoid duplicate main | 282 # exclude svr-main.o to avoid duplicate main |
270 svrfuzzobjs=$(subst svr-main.o, ,$(dropbearobjs)) | 283 svrfuzzobjs=$(subst svr-main.o, ,$(dropbearobjs)) |
284 | |
285 fuzz-harness.o: $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) fuzz-common.o | |
271 | 286 |
272 # build all the fuzzers. This will require fail to link unless built with | 287 # build all the fuzzers. This will require fail to link unless built with |
273 # make fuzz-targets FUZZLIB=-lFuzzer.a | 288 # make fuzz-targets FUZZLIB=-lFuzzer.a |
274 # or similar - the library provides main(). | 289 # or similar - the library provides main(). |
275 fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS) | 290 fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS) |
276 | 291 |
277 fuzzer-preauth: fuzzer-preauth.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) | 292 fuzzer-preauth: fuzzer-preauth.o fuzz-harness.o |
278 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 293 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
279 | 294 |
280 fuzzer-preauth_nomaths: fuzzer-preauth_nomaths.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) | 295 fuzzer-preauth_nomaths: fuzzer-preauth_nomaths.o fuzz-harness.o |
281 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 296 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
282 | 297 |
283 fuzzer-pubkey: fuzzer-pubkey.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) | 298 fuzzer-pubkey: fuzzer-pubkey.o fuzz-harness.o |
284 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 299 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
285 | 300 |
286 fuzzer-verify: fuzzer-verify.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) | 301 fuzzer-verify: fuzzer-verify.o fuzz-harness.o |
287 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 302 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
288 | 303 |
289 fuzzer-kexdh: fuzzer-kexdh.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) | 304 fuzzer-kexdh: fuzzer-kexdh.o fuzz-harness.o |
290 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 305 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
291 | 306 |
292 fuzzer-kexecdh: fuzzer-kexecdh.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) | 307 fuzzer-kexecdh: fuzzer-kexecdh.o fuzz-harness.o |
308 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | |
309 | |
310 fuzzer-kexcurve25519: fuzzer-kexcurve25519.o fuzz-harness.o | |
293 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ | 311 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@ |
294 | 312 |
295 fuzzer-%.options: Makefile | 313 fuzzer-%.options: Makefile |
296 echo "[libfuzzer]" > $@ | 314 echo "[libfuzzer]" > $@ |
297 echo "max_len = 50000" >> $@ | 315 echo "max_len = 50000" >> $@ |
300 # hostkeys.c is checked in to hg. | 318 # hostkeys.c is checked in to hg. |
301 fuzz-hostkeys: | 319 fuzz-hostkeys: |
302 dropbearkey -t rsa -f keyr | 320 dropbearkey -t rsa -f keyr |
303 dropbearkey -t dss -f keyd | 321 dropbearkey -t dss -f keyd |
304 dropbearkey -t ecdsa -size 256 -f keye | 322 dropbearkey -t ecdsa -size 256 -f keye |
323 dropbearkey -t ed25519 -f keyed25519 | |
305 echo > hostkeys.c | 324 echo > hostkeys.c |
306 /usr/bin/xxd -i -a keyr >> hostkeys.c | 325 /usr/bin/xxd -i -a keyr >> hostkeys.c |
307 /usr/bin/xxd -i -a keye >> hostkeys.c | 326 /usr/bin/xxd -i -a keye >> hostkeys.c |
308 /usr/bin/xxd -i -a keyd >> hostkeys.c | 327 /usr/bin/xxd -i -a keyd >> hostkeys.c |
328 /usr/bin/xxd -i -a keyed25519 >> hostkeys.c | |
309 | 329 |
310 # to make coverity happy? | 330 # to make coverity happy? |
311 test: | 331 test: |
312 true | 332 true |
333 |