mirror of
				https://github.com/clearml/dropbear
				synced 2025-06-26 18:17:32 +00:00 
			
		
		
		
	Use system libtomcrypt/libtommath if available. Doesn't currently
build due to clash in rsa_key identifier. --HG-- extra : convert_revision : c9a4726d1c89e17ee8e96801d1aaa8049216aae1
This commit is contained in:
		
							parent
							
								
									a8c28714cd
								
							
						
					
					
						commit
						4d050c34cb
					
				
							
								
								
									
										19
									
								
								Makefile.in
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								Makefile.in
									
									
									
									
									
								
							| @ -16,6 +16,12 @@ endif | ||||
| LTC=libtomcrypt/libtomcrypt.a | ||||
| LTM=libtommath/libtommath.a | ||||
| 
 | ||||
| ifeq (@BUNDLED_LIBTOM@, 1) | ||||
| LIBTOM_DEPS=$(LTC) $(LTM) | ||||
| CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/  | ||||
| LIBS+=$(LTC) $(LTM) | ||||
| endif | ||||
| 
 | ||||
| COMMONOBJS=dbutil.o buffer.o \
 | ||||
| 		dss.o bignum.o \
 | ||||
| 		signkey.o rsa.o random.o \
 | ||||
| @ -70,8 +76,8 @@ RANLIB=@RANLIB@ | ||||
| STRIP=@STRIP@ | ||||
| INSTALL=@INSTALL@ | ||||
| CPPFLAGS=@CPPFLAGS@ | ||||
| CFLAGS=-I. -I$(srcdir) -I$(srcdir)/libtomcrypt/src/headers/ $(CPPFLAGS) @CFLAGS@ | ||||
| LIBS=$(LTC) $(LTM) @LIBS@ | ||||
| CFLAGS=-I. -I$(srcdir) $(CPPFLAGS) @CFLAGS@ | ||||
| LIBS+=@LIBS@ | ||||
| LDFLAGS=@LDFLAGS@ | ||||
| 
 | ||||
| EXEEXT=@EXEEXT@ | ||||
| @ -107,10 +113,6 @@ ifeq ($(SCPPROGRESS), 1) | ||||
| 	CFLAGS+=-DPROGRESS_METER | ||||
| endif | ||||
| 
 | ||||
| #%: $(HEADERS)
 | ||||
| #%: $(HEADERS) Makefile
 | ||||
| # TODO
 | ||||
| 
 | ||||
| all: $(TARGETS) | ||||
| 
 | ||||
| strip: $(TARGETS) | ||||
| @ -154,8 +156,7 @@ dbclient: $(dbclientobjs) | ||||
| dropbearkey: $(dropbearkeyobjs) | ||||
| dropbearconvert: $(dropbearconvertobjs) | ||||
| 
 | ||||
| dropbear dbclient dropbearkey dropbearconvert: $(HEADERS)  $(LTC) $(LTM) \ | ||||
| 													Makefile | ||||
| dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile | ||||
| 	$(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS) | ||||
| 
 | ||||
| # scp doesn't use the libs so is special.
 | ||||
| @ -172,7 +173,7 @@ endif | ||||
| 
 | ||||
| dropbearmulti: multilink  | ||||
| 
 | ||||
| multibinary: $(HEADERS) $(MULTIOBJS) $(LTC) $(LTM) Makefile | ||||
| multibinary: $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile | ||||
| 	$(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS) | ||||
| 
 | ||||
| multilink: multibinary $(addprefix link, $(PROGRAMS)) | ||||
|  | ||||
							
								
								
									
										25
									
								
								configure.in
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								configure.in
									
									
									
									
									
								
							| @ -363,6 +363,23 @@ AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline ) | ||||
| AC_CHECK_FUNCS(setutxent utmpxname) | ||||
| AC_CHECK_FUNCS(logout updwtmp logwtmp) | ||||
| 
 | ||||
| AC_ARG_ENABLE(bundled-libtom, | ||||
| 	[  --enable-bundled-libtom       Use bundled libtomcrypt/libtommath even if a system version exists], | ||||
| 	[  | ||||
| 		AC_MSG_NOTICE(use bundled) | ||||
| 		AC_DEFINE(BUNDLED_LIBTOM,,Use bundled libtom)  | ||||
| 		BUNDLED_LIBTOM=1 | ||||
| 	], | ||||
| 	[ | ||||
| 		AC_MSG_NOTICE(not bundled) | ||||
| 		BUNDLED_LIBTOM=0 | ||||
| 		AC_CHECK_LIB(tomcrypt, register_cipher, , BUNDLED_LIBTOM=1) | ||||
| 		AC_CHECK_LIB(tommath, mp_exptmod, , BUNDLED_LIBTOM=1) | ||||
| 	] | ||||
| ) | ||||
| 
 | ||||
| AC_SUBST(BUNDLED_LIBTOM) | ||||
| 
 | ||||
| dnl Added from OpenSSH 3.6.1p2's configure.ac | ||||
| 
 | ||||
| dnl allow user to disable some login recording features | ||||
| @ -671,5 +688,13 @@ AC_CONFIG_HEADER(config.h) | ||||
| AC_OUTPUT(Makefile) | ||||
| AC_OUTPUT(libtomcrypt/Makefile) | ||||
| AC_OUTPUT(libtommath/Makefile) | ||||
| 
 | ||||
| AC_MSG_NOTICE() | ||||
| if test $BUNDLED_LIBTOM = 1 ; then | ||||
| AC_MSG_NOTICE(Using bundled libtomcrypt and libtommath) | ||||
| else | ||||
| AC_MSG_NOTICE(Using system libtomcrypt and libtommath) | ||||
| fi | ||||
| 
 | ||||
| AC_MSG_NOTICE() | ||||
| AC_MSG_NOTICE(Now edit options.h to choose features.) | ||||
|  | ||||
| @ -120,8 +120,14 @@ | ||||
| #include <libgen.h> | ||||
| #endif | ||||
| 
 | ||||
| #ifdef BUNDLED_LIBTOM | ||||
| #include "libtomcrypt/src/headers/tomcrypt.h" | ||||
| #include "libtommath/tommath.h" | ||||
| #else | ||||
| #include <tomcrypt.h> | ||||
| #include <tommath.h> | ||||
| #endif | ||||
| 
 | ||||
| 
 | ||||
| #include "compat.h" | ||||
| #include "fake-rfc2553.h" | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user