diff options
| author | Tobias Brunner <tobias@strongswan.org> | 2012-05-15 16:37:02 +0200 | 
|---|---|---|
| committer | Tobias Brunner <tobias@strongswan.org> | 2012-06-11 17:33:32 +0200 | 
| commit | ee3026a1e270d73042b245ed5de1c8dcb24cf698 (patch) | |
| tree | 120d56b1c5fccf0b0742ec9ae53fce85faadd2c9 /src | |
| parent | 5b09310e67a0bb1d9f1aaf07fdc80b297aef4791 (diff) | |
| download | strongswan-ee3026a1e270d73042b245ed5de1c8dcb24cf698.tar.bz2 strongswan-ee3026a1e270d73042b245ed5de1c8dcb24cf698.tar.xz  | |
starter: Remove all ties to pluto/libfreeswan.
Moved some types/constants in the process.
Diffstat (limited to 'src')
| -rw-r--r-- | src/starter/Android.mk | 9 | ||||
| -rw-r--r-- | src/starter/Makefile.am | 11 | ||||
| -rw-r--r-- | src/starter/args.c | 3 | ||||
| -rw-r--r-- | src/starter/cmp.c | 5 | ||||
| -rw-r--r-- | src/starter/confread.c | 12 | ||||
| -rw-r--r-- | src/starter/confread.h | 18 | ||||
| -rw-r--r-- | src/starter/invokecharon.c | 3 | ||||
| -rw-r--r-- | src/starter/parser.y | 3 | ||||
| -rw-r--r-- | src/starter/starter.c | 4 | ||||
| -rw-r--r-- | src/starter/starterstroke.c | 3 | 
10 files changed, 25 insertions, 46 deletions
diff --git a/src/starter/Android.mk b/src/starter/Android.mk index ece936f7e..05f28fe45 100644 --- a/src/starter/Android.mk +++ b/src/starter/Android.mk @@ -14,11 +14,7 @@ invokecharon.h klips.c klips.h  LOCAL_C_INCLUDES += \  	$(libvstr_PATH) \  	$(strongswan_PATH)/src/libhydra \ -	$(strongswan_PATH)/src/libfreeswan \  	$(strongswan_PATH)/src/libstrongswan \ -	$(strongswan_PATH)/src/libfreeswan \ -	$(strongswan_PATH)/src/pluto \ -	$(strongswan_PATH)/src/whack \  	$(strongswan_PATH)/src/stroke  LOCAL_CFLAGS := $(strongswan_CFLAGS) -DSTART_CHARON \ @@ -37,11 +33,8 @@ LOCAL_ARM_MODE := arm  LOCAL_PRELINK_MODULE := false  LOCAL_REQUIRED_MODULES := stroke -ifneq ($(strongswan_BUILD_PLUTO),) -LOCAL_REQUIRED_MODULES += whack -endif -LOCAL_SHARED_LIBRARIES += libstrongswan libhydra libfreeswan +LOCAL_SHARED_LIBRARIES += libstrongswan libhydra  include $(BUILD_EXECUTABLE) diff --git a/src/starter/Makefile.am b/src/starter/Makefile.am index f2062c34f..37aa7f219 100644 --- a/src/starter/Makefile.am +++ b/src/starter/Makefile.am @@ -9,10 +9,7 @@ invokecharon.h klips.c klips.h  INCLUDES = \  -I${linux_headers} \  -I$(top_srcdir)/src/libstrongswan \ --I$(top_srcdir)/src/libfreeswan \  -I$(top_srcdir)/src/libhydra \ --I$(top_srcdir)/src/pluto \ --I$(top_srcdir)/src/whack \  -I$(top_srcdir)/src/stroke  AM_CFLAGS = \ @@ -27,14 +24,11 @@ AM_CFLAGS = \  AM_YFLAGS = -v -d -starter_LDADD = defs.o $(top_builddir)/src/libfreeswan/libfreeswan.a $(top_builddir)/src/libstrongswan/libstrongswan.la $(top_builddir)/src/libhydra/libhydra.la $(SOCKLIB) $(PTHREADLIB) +starter_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la $(top_builddir)/src/libhydra/libhydra.la $(SOCKLIB) $(PTHREADLIB)  EXTRA_DIST = keywords.txt ipsec.conf Android.mk  MAINTAINERCLEANFILES = keywords.c  BUILT_SOURCES = parser.h -PLUTODIR=$(top_srcdir)/src/pluto -SCEPCLIENTDIR=$(top_srcdir)/src/scepclient -  if USE_PLUTO    AM_CFLAGS += -DSTART_PLUTO  endif @@ -54,9 +48,6 @@ endif  keywords.c:	$(srcdir)/keywords.txt $(srcdir)/keywords.h  		$(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@ -defs.o:		$(PLUTODIR)/defs.c $(PLUTODIR)/defs.h -		$(COMPILE) -c -o $@ $(PLUTODIR)/defs.c -  install-exec-local :  		test -e "$(DESTDIR)${sysconfdir}/ipsec.d" || $(INSTALL) -o -d "$(DESTDIR)$(sysconfdir)/ipsec.d" || true  		test -e "$(DESTDIR)${sysconfdir}/ipsec.d/cacerts" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/cacerts" || true diff --git a/src/starter/args.c b/src/starter/args.c index af088c443..ab0f740f2 100644 --- a/src/starter/args.c +++ b/src/starter/args.c @@ -20,9 +20,6 @@  #include <library.h>  #include <debug.h> -#include "../pluto/constants.h" -#include "../pluto/defs.h" -  #include "keywords.h"  #include "confread.h"  #include "args.h" diff --git a/src/starter/cmp.c b/src/starter/cmp.c index b3caaeba0..e65d96f36 100644 --- a/src/starter/cmp.c +++ b/src/starter/cmp.c @@ -14,11 +14,6 @@  #include <string.h> -#include <freeswan.h> - -#include "../pluto/constants.h" -#include "../pluto/defs.h" -  #include "confread.h"  #include "args.h"  #include "cmp.h" diff --git a/src/starter/confread.c b/src/starter/confread.c index d6d36fade..55392c207 100644 --- a/src/starter/confread.c +++ b/src/starter/confread.c @@ -24,14 +24,16 @@  #include <library.h>  #include <debug.h> -#include "../pluto/constants.h" -#include "../pluto/defs.h" -  #include "keywords.h"  #include "confread.h"  #include "args.h"  #include "files.h" +#define IKE_LIFETIME_DEFAULT         10800 /* 3 hours */ +#define IPSEC_LIFETIME_DEFAULT        3600 /* 1 hour */ +#define SA_REPLACEMENT_MARGIN_DEFAULT  540 /* 9 minutes */ +#define SA_REPLACEMENT_FUZZ_DEFAULT    100 /* 100% of margin */ +#define SA_REPLACEMENT_RETRIES_DEFAULT   3  static const char ike_defaults[] = "aes128-sha1-modp2048,3des-sha1-modp1536";  static const char esp_defaults[] = "aes128-sha1-modp2048,3des-sha1-modp1536"; @@ -87,8 +89,8 @@ static void default_values(starter_config_t *cfg)  	cfg->conn_default.ike                   = strdupnull(ike_defaults);  	cfg->conn_default.esp                   = strdupnull(esp_defaults); -	cfg->conn_default.sa_ike_life_seconds   = OAKLEY_ISAKMP_SA_LIFETIME_DEFAULT; -	cfg->conn_default.sa_ipsec_life_seconds = PLUTO_SA_LIFE_DURATION_DEFAULT; +	cfg->conn_default.sa_ike_life_seconds   = IKE_LIFETIME_DEFAULT; +	cfg->conn_default.sa_ipsec_life_seconds = IPSEC_LIFETIME_DEFAULT;  	cfg->conn_default.sa_rekey_margin       = SA_REPLACEMENT_MARGIN_DEFAULT;  	cfg->conn_default.sa_rekey_fuzz         = SA_REPLACEMENT_FUZZ_DEFAULT;  	cfg->conn_default.sa_keying_tries       = SA_REPLACEMENT_RETRIES_DEFAULT; diff --git a/src/starter/confread.h b/src/starter/confread.h index 5064f6cd8..9763bf7b8 100644 --- a/src/starter/confread.h +++ b/src/starter/confread.h @@ -16,8 +16,6 @@  #ifndef _IPSEC_CONFREAD_H_  #define _IPSEC_CONFREAD_H_ -#include <freeswan.h> -#include "../pluto/constants.h"  #include <kernel/kernel_ipsec.h>  #include "ipsec-parser.h" @@ -56,6 +54,22 @@ typedef enum {  } strict_t;  typedef enum { +		CERT_ALWAYS_SEND, +		CERT_SEND_IF_ASKED, +		CERT_NEVER_SEND, +		CERT_YES_SEND,		/* synonym for CERT_ALWAYS_SEND */ +		CERT_NO_SEND,		/* synonym for CERT_NEVER_SEND */ +} certpolicy_t; + +typedef enum { +		DPD_ACTION_NONE, +		DPD_ACTION_CLEAR, +		DPD_ACTION_HOLD, +		DPD_ACTION_RESTART, +		DPD_ACTION_UNKNOW, +} dpd_action_t; + +typedef enum {  		/* IPsec options */  		SA_OPTION_AUTHENTICATE	= 1 << 0, /* use AH instead of ESP? */  		SA_OPTION_COMPRESS      = 1 << 1, /* use IPComp */ diff --git a/src/starter/invokecharon.c b/src/starter/invokecharon.c index 4d7adf58a..102d1589e 100644 --- a/src/starter/invokecharon.c +++ b/src/starter/invokecharon.c @@ -26,9 +26,6 @@  #include <library.h>  #include <debug.h> -#include "../pluto/constants.h" -#include "../pluto/defs.h" -  #include "confread.h"  #include "invokecharon.h"  #include "files.h" diff --git a/src/starter/parser.y b/src/starter/parser.y index 58efeef03..424e3a9fd 100644 --- a/src/starter/parser.y +++ b/src/starter/parser.y @@ -20,9 +20,6 @@  #include <library.h>  #include <debug.h> -#include "../pluto/constants.h" -#include "../pluto/defs.h" -  #include "ipsec-parser.h"  #define YYERROR_VERBOSE diff --git a/src/starter/starter.c b/src/starter/starter.c index 7f380c22c..40500b689 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -30,16 +30,12 @@  #include <grp.h>  #include <pthread.h> -#include <freeswan.h>  #include <library.h>  #include <hydra.h>  #include <utils/backtrace.h>  #include <threading/thread.h>  #include <debug.h> -#include "../pluto/constants.h" -#include "../pluto/defs.h" -  #include "confread.h"  #include "files.h"  #include "starterstroke.h" diff --git a/src/starter/starterstroke.c b/src/starter/starterstroke.c index 28846be1a..26ac5dafc 100644 --- a/src/starter/starterstroke.c +++ b/src/starter/starterstroke.c @@ -29,9 +29,6 @@  #include <library.h>  #include <debug.h> -#include <constants.h> -#include <defs.h> -  #include <stroke_msg.h>  #include "starterstroke.h"  | 
