]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
starter: Remove all ties to pluto/libfreeswan.
authorTobias Brunner <tobias@strongswan.org>
Tue, 15 May 2012 14:37:02 +0000 (16:37 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 11 Jun 2012 15:33:32 +0000 (17:33 +0200)
Moved some types/constants in the process.

src/starter/Android.mk
src/starter/Makefile.am
src/starter/args.c
src/starter/cmp.c
src/starter/confread.c
src/starter/confread.h
src/starter/invokecharon.c
src/starter/parser.y
src/starter/starter.c
src/starter/starterstroke.c

index ece936f7ebf6e0cf84681389788e7390bfa25041..05f28fe45a10ac14112fd75c32461776f5f67223 100644 (file)
@@ -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)
 
index f2062c34f879b09b105a4d42a65fb0fdb775b5d8..37aa7f21970a0ee4b0173f2070ecdcccf7325d72 100644 (file)
@@ -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
index af088c44327105d1b5a17249968fbfdbb35319c5..ab0f740f2f536c9718cd2645b8ff3888fd196f5e 100644 (file)
@@ -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"
index b3caaeba0019cc32945951ccfd2be5f08dfcccc4..e65d96f36760804146a5e304b7b8528018f03eed 100644 (file)
 
 #include <string.h>
 
-#include <freeswan.h>
-
-#include "../pluto/constants.h"
-#include "../pluto/defs.h"
-
 #include "confread.h"
 #include "args.h"
 #include "cmp.h"
index d6d36fade1379e2fe9fe0312b0699047220dec23..55392c207a39bdbc44dbc6ed701d6f6f5721177f 100644 (file)
 #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;
index 5064f6cd87d066fe512cceac4d2faeb85b298bf4..9763bf7b83b85e271ac3d783bfe7da1c72c9d218 100644 (file)
@@ -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"
@@ -55,6 +53,22 @@ typedef enum {
                STRICT_IFURI
 } 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? */
index 4d7adf58a5340a05f1bf955ff04a58d59f0ee692..102d1589e0d6006985133fb1ea24f72f12860897 100644 (file)
@@ -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"
index 58efeef03c1ff0bb18282158c8ed21d11c27a02a..424e3a9fd48153dd1af66d29faf3b4a5b92f86aa 100644 (file)
@@ -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
index 7f380c22cb64d4e21422f2b4dae7a43012e34e73..40500b6894e3b8542b627692ec84c4721ed6409a 100644 (file)
 #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"
index 28846be1a3d466d0e994d5156a0c7e90e6d61abd..26ac5dafc951cb2f6dc4bb84000e5d1f130454fc 100644 (file)
@@ -29,9 +29,6 @@
 #include <library.h>
 #include <debug.h>
 
-#include <constants.h>
-#include <defs.h>
-
 #include <stroke_msg.h>
 
 #include "starterstroke.h"