- introduced autotools
- first working version - make dist should work - things to do: - UML testing! - more cleanups
This commit is contained in:
parent
eedfdfbe6e
commit
f2c2d395ff
8
LICENSE
8
LICENSE
|
@ -5,22 +5,22 @@ see the file COPYING.
|
|||
See the file CREDITS for details on origins of more of the code.
|
||||
|
||||
The DES library is under a BSD style license, see
|
||||
linux/crypto/ciphers/des/COPYRIGHT.
|
||||
src/libcrypto/libdes/COPYRIGHT.
|
||||
Note that this software has a advertising clause in it.
|
||||
|
||||
The MD2 implementation is from RSA Data Security Inc., so this package must
|
||||
include the following phrase: "RSA Data Security, Inc. MD2 Message Digest
|
||||
Algorithm" It is not under the GPL; see details in programs/pluto/md2.c.
|
||||
Algorithm" It is not under the GPL; see details in src/pluto/md2.c.
|
||||
|
||||
The MD5 implementation is from RSA Data Security Inc., so this package must
|
||||
include the following phrase: "derived from the RSA Data Security, Inc.
|
||||
MD5 Message-Digest Algorithm". It is not under the GPL; see details in
|
||||
linux/net/ipsec/ipsec_md5c.c.
|
||||
src/libfreeswan/ipsec_md5c.c.
|
||||
|
||||
The PKCS#11 header files in programs/pluto/rsaref/ are from RSA Security Inc.,
|
||||
so they must include the following phrase: "RSA Security Inc. PKCS#11
|
||||
Cryptographic Token Interface (Cryptoki)". The headers are not under the GPL;
|
||||
see details in programs/pluto/rsaref/pkcs11.h.
|
||||
see details in src/pluto/rsaref/pkcs11.h.
|
||||
|
||||
The linux/net/ipsec/radij.c code is derived from BSD 4.4lite code
|
||||
from sys/net/radix.c.
|
||||
|
|
42
Makefile
42
Makefile
|
@ -1,42 +0,0 @@
|
|||
# FreeS/WAN master makefile
|
||||
# Copyright (C) 1998-2002 Henry Spencer.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# RCSID $Id: Makefile,v 1.4 2004/11/14 21:50:59 as Exp $
|
||||
|
||||
|
||||
FREESWANSRCDIR=$(shell pwd)
|
||||
export FREESWANSRCDIR
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
# directories visited by all recursion
|
||||
SUBDIRS=lib src linux
|
||||
|
||||
# declaration for make's benefit
|
||||
.PHONY: programs install clean distclean \
|
||||
uninstall install_file_list
|
||||
|
||||
# programs
|
||||
|
||||
all: programs
|
||||
|
||||
programs install install_file_list clean::
|
||||
@for d in $(SUBDIRS) ; \
|
||||
do \
|
||||
(cd $$d && $(MAKE) FREESWANSRCDIR=.. $@ ) || exit 1; \
|
||||
done; \
|
||||
|
||||
# uninstall, as much as possible
|
||||
uninstall:
|
||||
$(MAKE) --no-print-directory install_file_list | egrep -v '(/ipsec.conf$$|/ipsec.d/)' | xargs rm -f
|
||||
|
|
@ -0,0 +1 @@
|
|||
SUBDIRS = src
|
235
Makefile.inc
235
Makefile.inc
|
@ -1,235 +0,0 @@
|
|||
# FreeS/WAN pathnames and other master configuration
|
||||
# Copyright (C) 2001, 2002 Henry Spencer.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# RCSID $Id: Makefile.inc,v 1.12 2006/01/25 17:23:15 as Exp $
|
||||
|
||||
|
||||
# Variables in this file with names starting with INC_ are not for use
|
||||
# by Makefiles which include it; they are subject to change without warning.
|
||||
#
|
||||
# "Final" and "finally" refer to where the files will end up on the
|
||||
# running IPsec system, as opposed to where they get installed by our
|
||||
# Makefiles. (The two are different for cross-compiles and the like,
|
||||
# where our Makefiles are not the end of the installation process.)
|
||||
# Paths with FINAL in their names are the only ones that the installed
|
||||
# software itself depends on. (Very few things should know about the
|
||||
# FINAL paths; think twice and consult Henry before making something new
|
||||
# depend on them.) All other paths are install targets.
|
||||
# See also DESTDIR, below.
|
||||
|
||||
|
||||
### boilerplate, do not change
|
||||
SHELL=/bin/sh
|
||||
|
||||
### paths within the source tree
|
||||
|
||||
KLIPSINC=${FREESWANSRCDIR}/linux/include
|
||||
KLIPSSRC=${FREESWANSRCDIR}/linux/net/ipsec
|
||||
|
||||
LIBFREESWANDIR=${FREESWANSRCDIR}/linux/lib/libfreeswan
|
||||
FREESWANLIB=${FREESWANSRCDIR}/lib/libfreeswan/libfreeswan.a
|
||||
|
||||
LWRESDIR=${FREESWANSRCDIR}/lib/liblwres
|
||||
LWRESLIB=${LWRESDIR}/liblwres.a
|
||||
|
||||
LIBDESSRCDIR=${FREESWANSRCDIR}/linux/crypto/ciphers/des
|
||||
LIBDESLITE=${FREESWANSRCDIR}/lib/libdes/libdes.a
|
||||
|
||||
LIBPOLICYDIR=${FREESWANSRCDIR}/linux/lib/libipsecpolicy
|
||||
POLICYLIB=${FREESWANSRCDIR}/lib/libipsecpolicy/libipsecpolicy.a
|
||||
|
||||
.PHONY: programs checkprograms clean
|
||||
|
||||
### install pathnames
|
||||
|
||||
# DESTDIR can be used to supply a prefix to all install targets.
|
||||
# (Note that "final" pathnames, signifying where files will eventually
|
||||
# reside rather than where install puts them, are exempt from this.)
|
||||
# The prefixing is done in this file, so as to have central control over
|
||||
# it; DESTDIR itself should never appear in any other Makefile.
|
||||
DESTDIR?=
|
||||
|
||||
# "local" part of tree, used in building other pathnames
|
||||
INC_USRLOCAL=/usr/local
|
||||
|
||||
# PUBDIR is where the "ipsec" command goes; beware, many things define PATH
|
||||
# settings which are assumed to include it (or at least, to include *some*
|
||||
# copy of the "ipsec" command).
|
||||
PUBDIR=$(DESTDIR)$(INC_USRLOCAL)/sbin
|
||||
|
||||
# BINDIR is where sub-commands get put, FINALBINDIR is where the "ipsec"
|
||||
# command will look for them when it is run. Also called LIBEXECDIR.
|
||||
FINALLIBEXECDIR=$(INC_USRLOCAL)/libexec/ipsec
|
||||
LIBEXECDIR=$(DESTDIR)$(FINALBINDIR)
|
||||
|
||||
FINALBINDIR=${FINALLIBEXECDIR}
|
||||
BINDIR=${LIBEXECDIR}
|
||||
|
||||
|
||||
# SBINDIR is where the user interface command goes.
|
||||
FINALSBINDIR=$(INC_USRLOCAL)/sbin
|
||||
SBINDIR=$(DESTDIR)$(FINALSBINDIR)
|
||||
|
||||
# libdir is where utility files go
|
||||
FINALLIBDIR=$(INC_USRLOCAL)/lib/ipsec
|
||||
LIBDIR=$(DESTDIR)$(FINALLIBDIR)
|
||||
|
||||
# sharedlibdir is where shared libraries go
|
||||
SHAREDLIBDIR=$(DESTDIR)$(INC_USRLOCAL)/lib
|
||||
|
||||
# where the appropriate manpage tree is located
|
||||
# location within INC_USRLOCAL
|
||||
INC_MANDIR=man
|
||||
# the full pathname
|
||||
MANTREE=$(DESTDIR)$(INC_USRLOCAL)/$(INC_MANDIR)
|
||||
# all relevant subdirectories of MANTREE
|
||||
MANPLACES=man3 man5 man8
|
||||
|
||||
# where configuration files go
|
||||
FINALCONFFILE?=/etc/ipsec.conf
|
||||
CONFFILE=$(DESTDIR)$(FINALCONFFILE)
|
||||
|
||||
FINALCONFDIR?=/etc
|
||||
CONFDIR=$(DESTDIR)$(FINALCONFDIR)
|
||||
|
||||
FINALCONFDDIR?=${FINALCONFDIR}/ipsec.d
|
||||
CONFDDIR=$(DESTDIR)$(FINALCONFDDIR)
|
||||
|
||||
# sample configuration files go into
|
||||
INC_DOCDIR?=share/doc
|
||||
FINALEXAMPLECONFDIR=${INC_USRLOCAL}/${INC_DOCDIR}/strongswan
|
||||
EXAMPLECONFDIR=${DESTDIR}${FINALEXAMPLECONFDIR}
|
||||
|
||||
FINALDOCDIR?=${INC_USRLOCAL}/${INC_DOCDIR}/strongswan
|
||||
DOCDIR=${DESTDIR}${FINALDOCDIR}
|
||||
|
||||
# where per-conn pluto logs go
|
||||
VARDIR?=/var
|
||||
LOGDIR?=${VARDIR}/log
|
||||
FINALLOGDIR?=${DESTDIR}${LOGDIR}
|
||||
|
||||
|
||||
# An attempt is made to automatically figure out where boot/shutdown scripts
|
||||
# will finally go: the first directory in INC_RCDIRS which exists gets them.
|
||||
# If none of those exists (or INC_RCDIRS is empty), INC_RCDEFAULT gets them.
|
||||
# With a non-null DESTDIR, INC_RCDEFAULT will be used unless one of the
|
||||
# INC_RCDIRS directories has been pre-created under DESTDIR.
|
||||
INC_RCDIRS=/etc/rc.d/init.d /etc/rc.d /etc/init.d /sbin/init.d
|
||||
INC_RCDEFAULT=/etc/rc.d/init.d
|
||||
|
||||
# RCDIR is where boot/shutdown scripts go; FINALRCDIR is where they think
|
||||
# will finally be (so utils/Makefile can create a symlink in BINDIR to the
|
||||
# place where the boot/shutdown script will finally be, rather than the
|
||||
# place where it is installed).
|
||||
FINALRCDIR=$(shell for d in $(INC_RCDIRS) ; \
|
||||
do if test -d $(DESTDIR)/$$d ; \
|
||||
then echo $$d ; exit 0 ; \
|
||||
fi ; done ; echo $(INC_RCDEFAULT) )
|
||||
RCDIR=$(DESTDIR)$(FINALRCDIR)
|
||||
|
||||
|
||||
|
||||
### misc installation stuff
|
||||
|
||||
# what program to use when installing things
|
||||
INSTALL=install
|
||||
|
||||
# flags to the install program, for programs, manpages, and config files
|
||||
# -b has install make backups (n.b., unlinks original), --suffix controls
|
||||
# how backup names are composed.
|
||||
# Note that the install procedures will never overwrite an existing config
|
||||
# file, which is why -b is not specified for them.
|
||||
INSTBINFLAGS=-b --suffix=.old
|
||||
INSTMANFLAGS=
|
||||
INSTCONFFLAGS=
|
||||
|
||||
|
||||
### misc configuration, included here in hopes that other files will not
|
||||
### have to be changed for common customizations.
|
||||
|
||||
# extra compile flags, for userland and kernel stuff, e.g. -g for debug info
|
||||
# (caution, this stuff is still being sorted out, will change in future)
|
||||
USERCOMPILE?=-g -O3
|
||||
|
||||
# FreeSWAN 3.x will require bind9.
|
||||
USE_LWRES?=false
|
||||
|
||||
# whether or not to use iproute2 based commands.
|
||||
#
|
||||
USE_IPROUTE2?=true
|
||||
|
||||
# what kind of firewalling to use:
|
||||
# 2.0 - ipfwadm
|
||||
# 2.2 - ipchains
|
||||
# 2.4 - iptables
|
||||
IPSEC_FIREWALLTYPE=iptables
|
||||
|
||||
# whether or not to include ipsec policy code into pluto.
|
||||
# false for now, since it is still experimental.
|
||||
USE_IPSECPOLICY?=false
|
||||
|
||||
# include support for KEY RR
|
||||
# this will become false in late 2003.
|
||||
USE_KEYRR?=true
|
||||
|
||||
# include support for KERNEL 2.5/2.6 IPsec in pluto
|
||||
USE_KERNEL26?=true
|
||||
|
||||
# whether or not pluto sends its strongSwan Vendor ID
|
||||
USE_VENDORID?=true
|
||||
|
||||
# whether or not pluto sends an XAUTH VID (Cisco Mode Config Interoperability)
|
||||
USE_XAUTH_VID?=false
|
||||
|
||||
# whether to support NAT Traversal (aka NAT-T)
|
||||
USE_NAT_TRAVERSAL?=true
|
||||
|
||||
# whether to support NAT-T in transport mode (needed for Win2K NAT-T Interop)
|
||||
USE_NAT_TRAVERSAL_TRANSPORT_MODE?=false
|
||||
|
||||
# include libcurl support (currently used for fetching CRLs, OCSP and SCEP)
|
||||
USE_LIBCURL?=false
|
||||
|
||||
# include LDAP support (currently used for fetching CRLs)
|
||||
USE_LDAP?=false
|
||||
|
||||
# uncomment this line if using the LDAPv3 protocol
|
||||
LDAP_VERSION=3
|
||||
# uncomment this line if using the LDAPv2 protocol
|
||||
#LDAP_VERSION=2
|
||||
|
||||
# include PKCS11-based smartcard support
|
||||
USE_SMARTCARD?=false
|
||||
|
||||
# Default PKCS11 library
|
||||
# Uncomment this line if using OpenSC <= 0.9.6
|
||||
#PKCS11_DEFAULT_LIB=\"/usr/lib/pkcs11/opensc-pkcs11.so\"
|
||||
# Uncomment this line if using OpenSC >= 0.10.0
|
||||
PKCS11_DEFAULT_LIB=\"/usr/lib/opensc-pkcs11.so\"
|
||||
# Uncomment and complete this line if using another default library
|
||||
#PKCS11_DEFAULT_LIB=\"/usr/lib/...\"
|
||||
|
||||
# Enable the leak detective to find memory leaks
|
||||
USE_LEAK_DETECTIVE?=false
|
||||
|
||||
# export everything so that scripts can use them.
|
||||
export LIBFREESWANDIR FREESWANSRCDIR FREESWANLIB
|
||||
|
||||
-include ${FREESWANSRCDIR}/Makefile.ver
|
||||
|
||||
# for emacs
|
||||
#
|
||||
# Local Variables: ;;;
|
||||
# mode: makefile ;;;
|
||||
# End Variables: ;;;
|
||||
#
|
|
@ -1 +0,0 @@
|
|||
IPSECVERSION=4.0.0
|
|
@ -1,3 +1,9 @@
|
|||
|
||||
- new build environment featuring autotools. Features such
|
||||
as HTTP, LDAP and smartcard support may be enabled using
|
||||
the ./configure script. Changing install directories
|
||||
is possible, too. See ./configure --help for more details.
|
||||
|
||||
strongswan-4.0.0
|
||||
----------------
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
dnl configure.in for linux strongSwan
|
||||
dnl Copyright (C) 2006 Martin Willi
|
||||
dnl Hochschule fuer Technik Rapperswil
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify it
|
||||
dnl under the terms of the GNU General Public License as published by the
|
||||
dnl Free Software Foundation; either version 2 of the License, or (at your
|
||||
dnl option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful, but
|
||||
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
dnl for more details.
|
||||
|
||||
dnl ===========================
|
||||
dnl initialize & set some vars
|
||||
dnl ===========================
|
||||
|
||||
AC_INIT(strongSwan,4.0.0)
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_C_BIGENDIAN
|
||||
AC_SUBST(ipsecdir, '${libexecdir}/ipsec')
|
||||
AC_SUBST(confdir, '${sysconfdir}')
|
||||
AC_SUBST(piddir, '/var/run')
|
||||
|
||||
dnl ===========================
|
||||
dnl check --enable-xxx params
|
||||
dnl ===========================
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[http],
|
||||
AS_HELP_STRING([--enable-http],[enable OCSP and fetching of Certificates and CRLs over HTTP (default is NO). Requires libcurl.]),
|
||||
http=true
|
||||
AC_DEFINE(LIBCURL)
|
||||
)
|
||||
AM_CONDITIONAL(USE_LIBCURL, test x$http = xtrue)
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[ldap],
|
||||
AS_HELP_STRING([--enable-ldap],[enable fetching of CRLs from LDAP (default is NO). Requires openldap. \
|
||||
Protocol version 2 or 3 are supported, use --with-ldap=version to specify \
|
||||
explicitly.]),
|
||||
ldap=true
|
||||
[case "${enableval}" in
|
||||
2) AC_DEFINE(LDAP_VER, 2) ;;
|
||||
3) AC_DEFINE(LDAP_VER, 3) ;;
|
||||
*) AC_MSG_ERROR([Invalid LDAP protocol version specified!]) ;;
|
||||
esac
|
||||
]
|
||||
)
|
||||
AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[pkcs11],
|
||||
AS_HELP_STRING([--enable-pkcs11],[enable PKCS11 smartcard support (default is NO). \
|
||||
Set the default PKCS11 library using \
|
||||
--enable-pkcs11=/path/to/default-pkcs11.so]),
|
||||
smartcard=true
|
||||
AC_DEFINE(SMARTCARD)
|
||||
AC_DEFINE(PKCS11_DEFAULT_LIB, ${enableval})
|
||||
)
|
||||
AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
[leak-detective],
|
||||
AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
|
||||
leak_detective=true
|
||||
AC_DEFINE(USE_LEAK_DETECTIVE)
|
||||
)
|
||||
AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
|
||||
|
||||
dnl =========================
|
||||
dnl check required programs
|
||||
dnl =========================
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_LEX
|
||||
AC_PROG_YACC
|
||||
AC_PROG_CC(intel)
|
||||
|
||||
dnl ==========================
|
||||
dnl check required libraries
|
||||
dnl ==========================
|
||||
|
||||
AC_HAVE_LIBRARY([gmp],,[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
|
||||
if test "$ldap" = "true"; then
|
||||
AC_HAVE_LIBRARY([ldap],,[AC_MSG_ERROR([LDAP enabled, but library ldap not found])])
|
||||
AC_HAVE_LIBRARY([lber],,[AC_MSG_ERROR([LDAP enabled, but library lber not found])])
|
||||
fi
|
||||
if test "$http" = "true"; then
|
||||
AC_HAVE_LIBRARY([curl],,[AC_MSG_ERROR([HTTP enabled, but library curl not found])])
|
||||
fi
|
||||
|
||||
|
||||
dnl =============================
|
||||
dnl check required header files
|
||||
dnl =============================
|
||||
|
||||
|
||||
AC_MSG_CHECKING([gmp.h version >= 4.1.4])
|
||||
AC_TRY_COMPILE(
|
||||
[#include "gmp.h"],
|
||||
[
|
||||
#if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
|
||||
#error bad gmp
|
||||
#endif
|
||||
],
|
||||
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
|
||||
)
|
||||
if test "$ldap" = "true"; then
|
||||
AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP enabled, but ldap.h not found!])])
|
||||
fi
|
||||
if test "$http" = "true"; then
|
||||
AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([HTTP enabled, but curl.h not found!])])
|
||||
fi
|
||||
|
||||
dnl ==============================
|
||||
dnl build Makefiles
|
||||
dnl ==============================
|
||||
|
||||
AC_OUTPUT(
|
||||
Makefile
|
||||
src/Makefile
|
||||
src/libstrongswan/Makefile
|
||||
src/libcrypto/Makefile
|
||||
src/libfreeswan/Makefile
|
||||
src/pluto/Makefile
|
||||
src/whack/Makefile
|
||||
src/charon/Makefile
|
||||
src/stroke/Makefile
|
||||
src/ipsec/Makefile
|
||||
src/starter/Makefile
|
||||
src/_updown/Makefile
|
||||
src/_updown_espmark/Makefile
|
||||
src/_copyright/Makefile
|
||||
src/openac/Makefile
|
||||
src/scepclient/Makefile
|
||||
)
|
465
src/Makefile
465
src/Makefile
|
@ -1,465 +0,0 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# src/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ..
|
||||
|
||||
pkgdatadir = $(datadir)/strongSwan
|
||||
pkglibdir = $(libdir)/strongSwan
|
||||
pkgincludedir = $(includedir)/strongSwan
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = /usr/bin/install -c
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = i686-pc-linux-gnu
|
||||
host_triplet = i686-pc-linux-gnu
|
||||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /home/mwilli/strongswan/trunk/missing --run aclocal-1.9
|
||||
AMDEP_FALSE = #
|
||||
AMDEP_TRUE =
|
||||
AMTAR = ${SHELL} /home/mwilli/strongswan/trunk/missing --run tar
|
||||
AR = ar
|
||||
AUTOCONF = ${SHELL} /home/mwilli/strongswan/trunk/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/mwilli/strongswan/trunk/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/mwilli/strongswan/trunk/missing --run automake-1.9
|
||||
AWK = gawk
|
||||
CC = gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CXX = g++
|
||||
CXXCPP = g++ -E
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"strongSwan\" -DVERSION=\"4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
|
||||
DEPDIR = .deps
|
||||
ECHO = echo
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = grep -E
|
||||
EXEEXT =
|
||||
F77 =
|
||||
FFLAGS =
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
|
||||
LDFLAGS =
|
||||
LIBOBJS =
|
||||
LIBS =
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LN_S = ln -s
|
||||
LTLIBOBJS =
|
||||
MAKEINFO = ${SHELL} /home/mwilli/strongswan/trunk/missing --run makeinfo
|
||||
OBJEXT = o
|
||||
PACKAGE = strongSwan
|
||||
PACKAGE_BUGREPORT =
|
||||
PACKAGE_NAME =
|
||||
PACKAGE_STRING =
|
||||
PACKAGE_TARNAME =
|
||||
PACKAGE_VERSION =
|
||||
PATH_SEPARATOR = :
|
||||
RANLIB = ranlib
|
||||
SET_MAKE =
|
||||
SHELL = /bin/sh
|
||||
STRIP = strip
|
||||
VERSION = 4.0
|
||||
ac_ct_AR = ar
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_CXX = g++
|
||||
ac_ct_F77 =
|
||||
ac_ct_RANLIB = ranlib
|
||||
ac_ct_STRIP = strip
|
||||
am__fastdepCC_FALSE = #
|
||||
am__fastdepCC_TRUE =
|
||||
am__fastdepCXX_FALSE = #
|
||||
am__fastdepCXX_TRUE =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
am__tar = ${AMTAR} chof - "$$tardir"
|
||||
am__untar = ${AMTAR} xf -
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = i686-pc-linux-gnu
|
||||
build_alias =
|
||||
build_cpu = i686
|
||||
build_os = linux-gnu
|
||||
build_vendor = pc
|
||||
datadir = ${prefix}/share
|
||||
exec_prefix = ${prefix}
|
||||
host = i686-pc-linux-gnu
|
||||
host_alias =
|
||||
host_cpu = i686
|
||||
host_os = linux-gnu
|
||||
host_vendor = pc
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${prefix}/info
|
||||
install_sh = /home/mwilli/strongswan/trunk/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${prefix}/man
|
||||
mkdir_p = mkdir -p --
|
||||
oldincludedir = /usr/include
|
||||
prefix = /usr/local
|
||||
program_transform_name = s,x,x,
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
sysconfdir = ${prefix}/etc
|
||||
target_alias =
|
||||
SUBDIRS = libstrongswan stroke charon whack
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1 @@
|
|||
SUBDIRS = libfreeswan libcrypto libstrongswan pluto whack charon stroke starter openac scepclient ipsec _updown _updown_espmark _copyright
|
|
@ -1,144 +0,0 @@
|
|||
|
||||
include ${FREESWANSRCDIR}/Makefile.ver
|
||||
|
||||
CFLAGS+=$(USERCOMPILE) -I${KLIPSINC}
|
||||
|
||||
CFLAGS+= -Wall
|
||||
CFLAGS+= -Wpointer-arith
|
||||
CFLAGS+= -Wcast-qual
|
||||
CFLAGS+= -Wstrict-prototypes
|
||||
CFLAGS+= -Wbad-function-cast
|
||||
|
||||
# die if there are any warnings
|
||||
ifndef WERROR
|
||||
WERROR:= -Werror
|
||||
endif
|
||||
|
||||
#CFLAGS+= ${WERROR}
|
||||
|
||||
ifneq ($(LD_LIBRARY_PATH),)
|
||||
LDFLAGS=-L$(LD_LIBRARY_PATH)
|
||||
endif
|
||||
|
||||
MANDIR8=$(MANTREE)/man8
|
||||
MANDIR5=$(MANTREE)/man5
|
||||
|
||||
ifndef PROGRAMDIR
|
||||
PROGRAMDIR=${LIBEXECDIR}
|
||||
endif
|
||||
|
||||
ifndef MANPROGPREFIX
|
||||
MANPROGPREFIX=ipsec_
|
||||
endif
|
||||
|
||||
ifndef CONFDSUBDIR
|
||||
CONFDSUBDIR=.
|
||||
endif
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
programs: all
|
||||
|
||||
ifneq ($(PROGRAM),check)
|
||||
check: $(PROGRAM)
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(NOINSTALL),true)
|
||||
|
||||
install:: $(PROGRAM) $(CONFFILES) $(EXTRA8MAN) $(EXTRA5MAN) $(EXTRA5PROC) $(LIBFILES) $(CONFDFILES)
|
||||
@mkdir -p $(PROGRAMDIR) $(MANDIR8) $(MANDIR5) $(LIBDIR) $(CONFDIR) $(CONFDDIR) $(CONFDDIR)/$(CONFDSUBDIR) $(EXAMPLECONFDIR)
|
||||
@if [ -n "$(PROGRAM)" ]; then $(INSTALL) $(INSTBINFLAGS) $(PROGRAM) $(PROGRAMDIR); fi
|
||||
@$(foreach f, $(addsuffix .8, $(PROGRAM)), \
|
||||
$(INSTALL) $(INSTMANFLAGS) $f $(MANDIR8)/$(MANPROGPREFIX)$f || exit 1; \
|
||||
)
|
||||
@$(foreach f, $(EXTRA8MAN), \
|
||||
$(INSTALL) $(INSTMANFLAGS) $f $(MANDIR8)/ipsec_$f || exit 1; \
|
||||
)
|
||||
@$(foreach f, $(EXTRA5MAN), \
|
||||
$(INSTALL) $(INSTMANFLAGS) $f $(MANDIR5)/$f || exit 1 ;\
|
||||
)
|
||||
@$(foreach f, $(EXTRA5PROC), \
|
||||
$(INSTALL) $(INSTMANFLAGS) $f $(MANDIR5)/ipsec_$f || exit 1 ;\
|
||||
)
|
||||
@$(foreach f, $(LIBFILES), \
|
||||
$(INSTALL) $(INSTCONFFLAGS) $f $(LIBDIR)/$f || exit 1 ;\
|
||||
)
|
||||
@$(foreach f, $(CONFFILES), \
|
||||
if [ ! -f $(CONFDIR)/$f ]; then $(INSTALL) $(INSTCONFFLAGS) $f $(CONFDIR)/$f || exit 1; fi;\
|
||||
$(INSTALL) $(INSTCONFFLAGS) $f $(EXAMPLECONFDIR)/$f-sample || exit 1; \
|
||||
)
|
||||
@$(foreach f, $(CONFDFILES), \
|
||||
if [ ! -f $(CONFDDIR)/$(CONFDSUBDIR)/$f ]; then $(INSTALL) $(INSTCONFFLAGS) $f $(CONFDDIR)/$(CONFDSUBDIR)/$f || exit 1; fi;\
|
||||
)
|
||||
|
||||
install_file_list::
|
||||
@if [ -n "$(PROGRAM)" ]; then echo $(PROGRAMDIR)/$(PROGRAM); fi
|
||||
@$(foreach f, $(addsuffix .8, $(PROGRAM)), \
|
||||
echo $(MANDIR8)/${MANPROGPREFIX}$f; \
|
||||
)
|
||||
@$(foreach f, $(EXTRA8MAN), \
|
||||
echo $(MANDIR8)/ipsec_$f; \
|
||||
)
|
||||
@$(foreach f, $(EXTRA5MAN), \
|
||||
echo $(MANDIR5)/$f;\
|
||||
)
|
||||
@$(foreach f, $(EXTRA5PROC), \
|
||||
echo $(MANDIR5)/ipsec_$f; \
|
||||
)
|
||||
@$(foreach f, $(LIBFILES), \
|
||||
echo $(LIBDIR)/$f;\
|
||||
)
|
||||
@$(foreach f, $(CONFFILES), \
|
||||
echo $(CONFDIR)/$f;\
|
||||
echo $(EXAMPLECONFDIR)/$f-sample;\
|
||||
)
|
||||
@$(foreach f, $(CONFDFILES), \
|
||||
echo $(CONFDDIR)/${CONFDSUBDIR}/$f;\
|
||||
)
|
||||
|
||||
endif
|
||||
|
||||
# cancel the rule that compiles directly
|
||||
%: %.c
|
||||
|
||||
%: %.o $(OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $@.o ${OBJS} $(LDFLAGS) $(LIBS)
|
||||
|
||||
%: %.in ${FREESWANSRCDIR}/Makefile.inc ${FREESWANSRCDIR}/Makefile.ver
|
||||
cat $< | sed -e "s/xxx/$(IPSECVERSION)/" \
|
||||
-e "s:@IPSEC_DIR@:$(FINALBINDIR):" \
|
||||
-e "s:@IPSEC_EXECDIR@:$(FINALLIBEXECDIR):" \
|
||||
-e "s:@IPSEC_SBINDIR@:$(FINALSBINDIR):" \
|
||||
-e "s:@IPSEC_LIBDIR@:$(FINALLIBDIR):" \
|
||||
-e "s:@FINALCONFDIR@:$(FINALCONFDIR):" \
|
||||
-e "s:@EXAMPLECONFDIR@:$(EXAMPLECONFDIR):" \
|
||||
-e "s:@FINALDOCDIR@:$(FINALDOCDIR):" \
|
||||
-e "s:@FINALEXAMPLECONFDIR@:$(FINALEXAMPLECONFDIR):" \
|
||||
-e "s:@MODULE_GOO_LIST@:$(MODULE_GOO_LIST):" \
|
||||
-e "s:@IPSEC_CONFS@:$(FINALCONFDIR):" \
|
||||
-e "s:@IPSEC_CONFDDIR@:$(FINALCONFDDIR):" \
|
||||
-e "s:@USE_IPROUTE2@:$(USE_IPROUTE2):" \
|
||||
-e "s:@IPSEC_FIREWALLTYPE@:$(IPSEC_FIREWALLTYPE):" \
|
||||
| cat >$@
|
||||
if [ -x $< ]; then chmod +x $@; fi
|
||||
if [ "${PROGRAM}.in" = $< ]; then chmod +x $@; fi
|
||||
|
||||
cleanall: clean
|
||||
|
||||
distclean: clean
|
||||
|
||||
mostlyclean: clean
|
||||
|
||||
realclean: clean
|
||||
|
||||
clean::
|
||||
ifneq ($(strip $(PROGRAM)),)
|
||||
@if [ -r $(PROGRAM).in ]; then rm -f $(PROGRAM); fi
|
||||
@if [ -r $(PROGRAM).c ]; then rm -f $(PROGRAM); fi
|
||||
@if [ -n "$(OBJS)" ]; then rm -f $(PROGRAM); fi
|
||||
endif
|
||||
@rm -f *.o
|
||||
|
||||
checkprograms:
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# Makefile for miscelaneous programs
|
||||
# Copyright (C) 2002 Michael Richardson <mcr@freeswan.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# RCSID $Id: Makefile,v 1.1 2004/03/15 20:35:27 as Exp $
|
||||
|
||||
FREESWANSRCDIR=../..
|
||||
include ${FREESWANSRCDIR}/Makefile.inc
|
||||
|
||||
PROGRAM=_copyright
|
||||
PROGRAMDIR=${LIBDIR}
|
||||
LIBS=${FREESWANLIB}
|
||||
|
||||
include ../Makefile.program
|
||||
|
||||
#
|
||||
# $Log: Makefile,v $
|
||||
# Revision 1.1 2004/03/15 20:35:27 as
|
||||
# added files from freeswan-2.04-x509-1.5.3
|
||||
#
|
||||
# Revision 1.3 2002/08/02 16:01:07 mcr
|
||||
# moved user visible programs to $PREFIX/libexec, while moving
|
||||
# private files to $PREFIX/lib.
|
||||
#
|
||||
# Revision 1.2 2002/06/02 22:02:14 mcr
|
||||
# changed TOPDIR->FREESWANSRCDIR in all Makefiles.
|
||||
# (note that linux/net/ipsec/Makefile uses TOPDIR because this is the
|
||||
# kernel sense.)
|
||||
#
|
||||
# Revision 1.1 2002/04/24 07:55:32 mcr
|
||||
# #include patches and Makefiles for post-reorg compilation.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
ipsec_PROGRAMS = _copyright
|
||||
_copyright_SOURCES = _copyright.c
|
||||
dist_man8_MANS = _copyright.8
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libfreeswan
|
||||
_copyright_LDADD = $(top_srcdir)/src/libfreeswan/libfreeswan.a
|
|
@ -1,22 +0,0 @@
|
|||
# Makefile for miscelaneous programs
|
||||
# Copyright (C) 2002 Michael Richardson <mcr@freeswan.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# RCSID $Id: Makefile,v 1.3 2006/04/17 06:48:49 as Exp $
|
||||
|
||||
FREESWANSRCDIR=../..
|
||||
include ${FREESWANSRCDIR}/Makefile.inc
|
||||
|
||||
PROGRAM=_updown
|
||||
PROGRAMDIR=${LIBDIR}
|
||||
|
||||
include ../Makefile.program
|
|
@ -0,0 +1,3 @@
|
|||
dist_ipsec_SCRIPTS = _updown
|
||||
dist_man8_MANS = _updown.8
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
# Makefile for miscelaneous programs
|
||||
# Copyright (C) 2002 Michael Richardson <mcr@freeswan.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# RCSID $Id: Makefile,v 1.1 2005/04/07 21:34:19 as Exp $
|
||||
|
||||
FREESWANSRCDIR=../..
|
||||
include ${FREESWANSRCDIR}/Makefile.inc
|
||||
|
||||
PROGRAM=_updown_espmark
|
||||
PROGRAMDIR=${LIBDIR}
|
||||
|
||||
include ../Makefile.program
|
|
@ -0,0 +1,2 @@
|
|||
dist_ipsec_SCRIPTS = _updown_espmark
|
||||
dist_man8_MANS = _updown_espmark.8
|
1487
src/charon/Makefile
1487
src/charon/Makefile
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,46 @@
|
|||
ipsec_PROGRAMS = charon
|
||||
|
||||
charon_SOURCES = \
|
||||
config/connections/connection.c config/connections/connection.h config/connections/local_connection_store.c \
|
||||
config/connections/connection_store.h config/connections/local_connection_store.h config/policies/policy.c \
|
||||
config/policies/policy.h config/policies/policy_store.h config/policies/local_policy_store.c \
|
||||
config/policies/local_policy_store.h config/credentials/local_credential_store.c \
|
||||
config/credentials/local_credential_store.h config/credentials/credential_store.h config/traffic_selector.c \
|
||||
config/traffic_selector.h config/proposal.c config/proposal.h config/configuration.c config/configuration.h \
|
||||
sa/states/state.c sa/states/state.h sa/states/ike_sa_init_requested.c sa/states/ike_sa_init_requested.h \
|
||||
sa/states/ike_sa_init_responded.c sa/states/ike_sa_established.c sa/states/ike_sa_established.h \
|
||||
sa/states/responder_init.c sa/states/responder_init.h sa/states/initiator_init.c sa/states/initiator_init.h \
|
||||
sa/states/ike_sa_init_responded.h sa/states/ike_auth_requested.c sa/states/ike_auth_requested.h \
|
||||
sa/child_sa.c sa/child_sa.h sa/ike_sa.c sa/ike_sa.h sa/ike_sa_manager.c sa/ike_sa_manager.h \
|
||||
sa/ike_sa_id.c sa/ike_sa_id.h sa/authenticator.c sa/authenticator.h encoding/payloads/encryption_payload.c \
|
||||
encoding/payloads/cert_payload.c encoding/payloads/payload.h encoding/payloads/traffic_selector_substructure.c \
|
||||
encoding/payloads/configuration_attribute.h encoding/payloads/proposal_substructure.h \
|
||||
encoding/payloads/transform_attribute.c encoding/payloads/transform_attribute.h \
|
||||
encoding/payloads/configuration_attribute.c encoding/payloads/transform_substructure.c \
|
||||
encoding/payloads/encryption_payload.h encoding/payloads/auth_payload.c encoding/payloads/ike_header.c \
|
||||
encoding/payloads/transform_substructure.h encoding/payloads/nonce_payload.c encoding/payloads/cert_payload.h \
|
||||
encoding/payloads/eap_payload.c encoding/payloads/ike_header.h encoding/payloads/auth_payload.h \
|
||||
encoding/payloads/ts_payload.c encoding/payloads/traffic_selector_substructure.h encoding/payloads/nonce_payload.h \
|
||||
encoding/payloads/notify_payload.c encoding/payloads/eap_payload.h encoding/payloads/notify_payload.h \
|
||||
encoding/payloads/ts_payload.h encoding/payloads/id_payload.c encoding/payloads/ke_payload.c \
|
||||
encoding/payloads/unknown_payload.c encoding/payloads/encodings.c encoding/payloads/id_payload.h \
|
||||
encoding/payloads/cp_payload.c encoding/payloads/delete_payload.c encoding/payloads/sa_payload.c \
|
||||
encoding/payloads/ke_payload.h encoding/payloads/unknown_payload.h encoding/payloads/encodings.h \
|
||||
encoding/payloads/certreq_payload.c encoding/payloads/cp_payload.h encoding/payloads/delete_payload.h \
|
||||
encoding/payloads/sa_payload.h encoding/payloads/vendor_id_payload.c encoding/payloads/certreq_payload.h \
|
||||
encoding/payloads/vendor_id_payload.h encoding/payloads/proposal_substructure.c encoding/payloads/payload.c \
|
||||
encoding/parser.h encoding/message.c encoding/generator.c encoding/message.h encoding/generator.h \
|
||||
encoding/parser.c daemon.c daemon.h network/packet.c \
|
||||
network/socket.c network/packet.h network/socket.h queues/jobs/job.h queues/jobs/job.c \
|
||||
queues/jobs/delete_established_ike_sa_job.c queues/jobs/retransmit_request_job.h queues/jobs/initiate_ike_sa_job.h \
|
||||
queues/jobs/incoming_packet_job.c queues/jobs/delete_half_open_ike_sa_job.c \
|
||||
queues/jobs/delete_established_ike_sa_job.h queues/jobs/delete_half_open_ike_sa_job.h \
|
||||
queues/jobs/incoming_packet_job.h queues/jobs/retransmit_request_job.c queues/jobs/initiate_ike_sa_job.c \
|
||||
queues/job_queue.c queues/event_queue.c queues/send_queue.h queues/job_queue.h queues/event_queue.h \
|
||||
queues/send_queue.c threads/kernel_interface.c threads/thread_pool.c threads/scheduler.c threads/sender.c \
|
||||
threads/sender.h threads/kernel_interface.h threads/scheduler.h threads/receiver.c threads/stroke_interface.c \
|
||||
threads/thread_pool.h threads/receiver.h threads/stroke_interface.h
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/charon -I$(top_srcdir)/src/stroke
|
||||
AM_CFLAGS = -DIPSEC_CONFDIR=\"${confdir}\" -DIPSEC_PIDDIR=\"${piddir}\"
|
||||
LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lgmp -lpthread
|
|
@ -1,25 +0,0 @@
|
|||
# Copyright (C) 2006 Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
CHARON_DIR= $(MAIN_DIR)charon/
|
||||
|
||||
$(BUILD_DIR)daemon.o : $(CHARON_DIR)daemon.c $(CHARON_DIR)daemon.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
|
||||
include $(CHARON_DIR)network/Makefile.network
|
||||
include $(CHARON_DIR)config/Makefile.config
|
||||
include $(CHARON_DIR)encoding/Makefile.encoding
|
||||
include $(CHARON_DIR)queues/Makefile.queues
|
||||
include $(CHARON_DIR)sa/Makefile.sa
|
||||
include $(CHARON_DIR)threads/Makefile.threads
|
|
@ -1,32 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
CONFIG_DIR= $(CHARON_DIR)config/
|
||||
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)traffic_selector.o
|
||||
$(BUILD_DIR)traffic_selector.o : $(CONFIG_DIR)traffic_selector.c $(CONFIG_DIR)traffic_selector.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)proposal.o
|
||||
$(BUILD_DIR)proposal.o : $(CONFIG_DIR)proposal.c $(CONFIG_DIR)proposal.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)configuration.o
|
||||
$(BUILD_DIR)configuration.o : $(CONFIG_DIR)configuration.c $(CONFIG_DIR)configuration.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
include $(CONFIG_DIR)connections/Makefile.connections
|
||||
include $(CONFIG_DIR)credentials/Makefile.credentials
|
||||
include $(CONFIG_DIR)policies/Makefile.policies
|
|
@ -1,24 +0,0 @@
|
|||
# Copyright (C) 2006 Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
CONNECTIONS_DIR= $(CONFIG_DIR)connections/
|
||||
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)connection.o
|
||||
$(BUILD_DIR)connection.o : $(CONNECTIONS_DIR)connection.c $(CONNECTIONS_DIR)connection.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)local_connection_store.o
|
||||
$(BUILD_DIR)local_connection_store.o : $(CONNECTIONS_DIR)local_connection_store.c $(CONNECTIONS_DIR)local_connection_store.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
|
@ -1,20 +0,0 @@
|
|||
# Copyright (C) 2006 Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
CREDENTIALS_DIR= $(CONFIG_DIR)credentials/
|
||||
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)local_credential_store.o
|
||||
$(BUILD_DIR)local_credential_store.o : $(CREDENTIALS_DIR)local_credential_store.c $(CREDENTIALS_DIR)local_credential_store.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
|
@ -1,24 +0,0 @@
|
|||
# Copyright (C) 2006 Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
POLICIES_DIR= $(CONFIG_DIR)policies/
|
||||
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)policy.o
|
||||
$(BUILD_DIR)policy.o : $(POLICIES_DIR)policy.c $(POLICIES_DIR)policy.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)local_policy_store.o
|
||||
$(BUILD_DIR)local_policy_store.o : $(POLICIES_DIR)local_policy_store.c $(POLICIES_DIR)local_policy_store.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
|
@ -200,35 +200,35 @@
|
|||
*
|
||||
* @ingroup charon
|
||||
*/
|
||||
#define PID_FILE "/var/run/charon.pid"
|
||||
#define PID_FILE IPSEC_PIDDIR "/charon.pid"
|
||||
|
||||
/**
|
||||
* Configuration directory
|
||||
*
|
||||
* @ingroup charon
|
||||
*/
|
||||
#define CONFIG_DIR "/etc"
|
||||
#define CONFIG_DIR IPSEC_CONFDIR
|
||||
|
||||
/**
|
||||
* Directory of IPsec relevant files
|
||||
*
|
||||
* @ingroup charon
|
||||
*/
|
||||
#define IPSEC_DIR CONFIG_DIR "/ipsec.d"
|
||||
#define IPSEC_D_DIR CONFIG_DIR "/ipsec.d"
|
||||
|
||||
/**
|
||||
* Directory for private keys
|
||||
*
|
||||
* @ingroup charon
|
||||
*/
|
||||
#define PRIVATE_KEY_DIR IPSEC_DIR "/private"
|
||||
#define PRIVATE_KEY_DIR IPSEC_D_DIR "/private"
|
||||
|
||||
/**
|
||||
* Directory for trusted certificates
|
||||
*
|
||||
* @ingroup charon
|
||||
*/
|
||||
#define CERTIFICATE_DIR IPSEC_DIR "/certs"
|
||||
#define CERTIFICATE_DIR IPSEC_D_DIR "/certs"
|
||||
|
||||
/**
|
||||
* Secrets files
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
ENCODING_DIR= $(CHARON_DIR)encoding/
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)generator.o
|
||||
$(BUILD_DIR)generator.o : $(ENCODING_DIR)generator.c $(ENCODING_DIR)generator.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)parser.o
|
||||
$(BUILD_DIR)parser.o : $(ENCODING_DIR)parser.c $(ENCODING_DIR)parser.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)message.o
|
||||
$(BUILD_DIR)message.o : $(ENCODING_DIR)message.c $(ENCODING_DIR)message.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
|
||||
include $(ENCODING_DIR)payloads/Makefile.payloads
|
|
@ -1,108 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
PAYLOADS_DIR= $(ENCODING_DIR)payloads/
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)encodings.o
|
||||
$(BUILD_DIR)encodings.o : $(PAYLOADS_DIR)encodings.c $(PAYLOADS_DIR)encodings.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ike_header.o
|
||||
$(BUILD_DIR)ike_header.o : $(PAYLOADS_DIR)ike_header.c $(PAYLOADS_DIR)ike_header.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ke_payload.o
|
||||
$(BUILD_DIR)ke_payload.o : $(PAYLOADS_DIR)ke_payload.c $(PAYLOADS_DIR)ke_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)nonce_payload.o
|
||||
$(BUILD_DIR)nonce_payload.o : $(PAYLOADS_DIR)nonce_payload.c $(PAYLOADS_DIR)nonce_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)notify_payload.o
|
||||
$(BUILD_DIR)notify_payload.o : $(PAYLOADS_DIR)notify_payload.c $(PAYLOADS_DIR)notify_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)id_payload.o
|
||||
$(BUILD_DIR)id_payload.o : $(PAYLOADS_DIR)id_payload.c $(PAYLOADS_DIR)id_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)auth_payload.o
|
||||
$(BUILD_DIR)auth_payload.o : $(PAYLOADS_DIR)auth_payload.c $(PAYLOADS_DIR)auth_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)cert_payload.o
|
||||
$(BUILD_DIR)cert_payload.o : $(PAYLOADS_DIR)cert_payload.c $(PAYLOADS_DIR)cert_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)certreq_payload.o
|
||||
$(BUILD_DIR)certreq_payload.o : $(PAYLOADS_DIR)certreq_payload.c $(PAYLOADS_DIR)certreq_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)delete_payload.o
|
||||
$(BUILD_DIR)delete_payload.o : $(PAYLOADS_DIR)delete_payload.c $(PAYLOADS_DIR)delete_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)vendor_id_payload.o
|
||||
$(BUILD_DIR)vendor_id_payload.o : $(PAYLOADS_DIR)vendor_id_payload.c $(PAYLOADS_DIR)vendor_id_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)cp_payload.o
|
||||
$(BUILD_DIR)cp_payload.o : $(PAYLOADS_DIR)cp_payload.c $(PAYLOADS_DIR)cp_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)configuration_attribute.o
|
||||
$(BUILD_DIR)configuration_attribute.o : $(PAYLOADS_DIR)configuration_attribute.c $(PAYLOADS_DIR)configuration_attribute.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)eap_payload.o
|
||||
$(BUILD_DIR)eap_payload.o : $(PAYLOADS_DIR)eap_payload.c $(PAYLOADS_DIR)eap_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)unknown_payload.o
|
||||
$(BUILD_DIR)unknown_payload.o : $(PAYLOADS_DIR)unknown_payload.c $(PAYLOADS_DIR)unknown_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ts_payload.o
|
||||
$(BUILD_DIR)ts_payload.o : $(PAYLOADS_DIR)ts_payload.c $(PAYLOADS_DIR)ts_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)traffic_selector_substructure.o
|
||||
$(BUILD_DIR)traffic_selector_substructure.o : $(PAYLOADS_DIR)traffic_selector_substructure.c $(PAYLOADS_DIR)traffic_selector_substructure.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)payload.o
|
||||
$(BUILD_DIR)payload.o : $(PAYLOADS_DIR)payload.c $(PAYLOADS_DIR)payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)proposal_substructure.o
|
||||
$(BUILD_DIR)proposal_substructure.o : $(PAYLOADS_DIR)proposal_substructure.c $(PAYLOADS_DIR)proposal_substructure.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)sa_payload.o
|
||||
$(BUILD_DIR)sa_payload.o : $(PAYLOADS_DIR)sa_payload.c $(PAYLOADS_DIR)sa_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)transform_attribute.o
|
||||
$(BUILD_DIR)transform_attribute.o : $(PAYLOADS_DIR)transform_attribute.c $(PAYLOADS_DIR)transform_attribute.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)transform_substructure.o
|
||||
$(BUILD_DIR)transform_substructure.o : $(PAYLOADS_DIR)transform_substructure.c $(PAYLOADS_DIR)transform_substructure.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)encryption_payload.o
|
||||
$(BUILD_DIR)encryption_payload.o : $(PAYLOADS_DIR)encryption_payload.c $(PAYLOADS_DIR)encryption_payload.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
NETWORK_DIR= $(CHARON_DIR)network/
|
||||
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)packet.o
|
||||
$(BUILD_DIR)packet.o : $(NETWORK_DIR)packet.c $(NETWORK_DIR)packet.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)socket.o
|
||||
$(BUILD_DIR)socket.o : $(NETWORK_DIR)socket.c $(NETWORK_DIR)socket.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
|
@ -1,30 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
QUEUES_DIR= $(CHARON_DIR)queues/
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)event_queue.o
|
||||
$(BUILD_DIR)event_queue.o : $(QUEUES_DIR)event_queue.c $(QUEUES_DIR)event_queue.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)job_queue.o
|
||||
$(BUILD_DIR)job_queue.o : $(QUEUES_DIR)job_queue.c $(QUEUES_DIR)job_queue.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)send_queue.o
|
||||
$(BUILD_DIR)send_queue.o : $(QUEUES_DIR)send_queue.c $(QUEUES_DIR)send_queue.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
|
||||
include $(QUEUES_DIR)jobs/Makefile.jobs
|
|
@ -1,40 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
JOBS_DIR= $(QUEUES_DIR)jobs/
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)delete_half_open_ike_sa_job.o
|
||||
$(BUILD_DIR)delete_half_open_ike_sa_job.o : $(JOBS_DIR)delete_half_open_ike_sa_job.c $(JOBS_DIR)delete_half_open_ike_sa_job.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)delete_established_ike_sa_job.o
|
||||
$(BUILD_DIR)delete_established_ike_sa_job.o : $(JOBS_DIR)delete_established_ike_sa_job.c $(JOBS_DIR)delete_established_ike_sa_job.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)incoming_packet_job.o
|
||||
$(BUILD_DIR)incoming_packet_job.o : $(JOBS_DIR)incoming_packet_job.c $(JOBS_DIR)incoming_packet_job.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)initiate_ike_sa_job.o
|
||||
$(BUILD_DIR)initiate_ike_sa_job.o : $(JOBS_DIR)initiate_ike_sa_job.c $(JOBS_DIR)initiate_ike_sa_job.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)retransmit_request_job.o
|
||||
$(BUILD_DIR)retransmit_request_job.o : $(JOBS_DIR)retransmit_request_job.c $(JOBS_DIR)retransmit_request_job.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)job.o
|
||||
$(BUILD_DIR)job.o : $(JOBS_DIR)job.c $(JOBS_DIR)job.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
SA_DIR= $(CHARON_DIR)sa/
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ike_sa_id.o
|
||||
$(BUILD_DIR)ike_sa_id.o : $(SA_DIR)ike_sa_id.c $(SA_DIR)ike_sa_id.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ike_sa_manager.o
|
||||
$(BUILD_DIR)ike_sa_manager.o : $(SA_DIR)ike_sa_manager.c $(SA_DIR)ike_sa_manager.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ike_sa.o
|
||||
$(BUILD_DIR)ike_sa.o : $(SA_DIR)ike_sa.c $(SA_DIR)ike_sa.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)authenticator.o
|
||||
$(BUILD_DIR)authenticator.o : $(SA_DIR)authenticator.c $(SA_DIR)authenticator.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)child_sa.o
|
||||
$(BUILD_DIR)child_sa.o : $(SA_DIR)child_sa.c $(SA_DIR)child_sa.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
include $(SA_DIR)states/Makefile.states
|
|
@ -1,43 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
STATES_DIR= $(SA_DIR)states/
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ike_auth_requested.o
|
||||
$(BUILD_DIR)ike_auth_requested.o : $(STATES_DIR)ike_auth_requested.c $(STATES_DIR)ike_auth_requested.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ike_sa_established.o
|
||||
$(BUILD_DIR)ike_sa_established.o : $(STATES_DIR)ike_sa_established.c $(STATES_DIR)ike_sa_established.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ike_sa_init_requested.o
|
||||
$(BUILD_DIR)ike_sa_init_requested.o : $(STATES_DIR)ike_sa_init_requested.c $(STATES_DIR)ike_sa_init_requested.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)ike_sa_init_responded.o
|
||||
$(BUILD_DIR)ike_sa_init_responded.o : $(STATES_DIR)ike_sa_init_responded.c $(STATES_DIR)ike_sa_init_responded.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)initiator_init.o
|
||||
$(BUILD_DIR)initiator_init.o : $(STATES_DIR)initiator_init.c $(STATES_DIR)initiator_init.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)responder_init.o
|
||||
$(BUILD_DIR)responder_init.o : $(STATES_DIR)responder_init.c $(STATES_DIR)responder_init.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)state.o
|
||||
$(BUILD_DIR)state.o : $(STATES_DIR)state.c $(STATES_DIR)state.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
|
@ -1,139 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
TESTCASES_DIR= $(MAIN_DIR)testing/
|
||||
|
||||
|
||||
$(BUILD_DIR)testcases.o : $(TESTCASES_DIR)testcases.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)aes_cbc_crypter_test.o
|
||||
$(BUILD_DIR)aes_cbc_crypter_test.o : $(TESTCASES_DIR)aes_cbc_crypter_test.c $(TESTCASES_DIR)aes_cbc_crypter_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)diffie_hellman_test.o
|
||||
$(BUILD_DIR)diffie_hellman_test.o : $(TESTCASES_DIR)diffie_hellman_test.c $(TESTCASES_DIR)diffie_hellman_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)event_queue_test.o
|
||||
$(BUILD_DIR)event_queue_test.o : $(TESTCASES_DIR)event_queue_test.c $(TESTCASES_DIR)event_queue_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)generator_test.o
|
||||
$(BUILD_DIR)generator_test.o : $(TESTCASES_DIR)generator_test.c $(TESTCASES_DIR)generator_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)ike_sa_id_test.o
|
||||
$(BUILD_DIR)ike_sa_id_test.o : $(TESTCASES_DIR)ike_sa_id_test.c $(TESTCASES_DIR)ike_sa_id_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)job_queue_test.o
|
||||
$(BUILD_DIR)job_queue_test.o : $(TESTCASES_DIR)job_queue_test.c $(TESTCASES_DIR)job_queue_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)parser_test.o
|
||||
$(BUILD_DIR)parser_test.o : $(TESTCASES_DIR)parser_test.c $(TESTCASES_DIR)parser_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)hasher_test.o
|
||||
$(BUILD_DIR)hasher_test.o : $(TESTCASES_DIR)hasher_test.c $(TESTCASES_DIR)hasher_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)ike_sa_manager_test.o
|
||||
$(BUILD_DIR)ike_sa_manager_test.o : $(TESTCASES_DIR)ike_sa_manager_test.c $(TESTCASES_DIR)ike_sa_manager_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)linked_list_test.o
|
||||
$(BUILD_DIR)linked_list_test.o : $(TESTCASES_DIR)linked_list_test.c $(TESTCASES_DIR)linked_list_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)hmac_test.o
|
||||
$(BUILD_DIR)hmac_test.o : $(TESTCASES_DIR)hmac_test.c $(TESTCASES_DIR)hmac_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)hmac_signer_test.o
|
||||
$(BUILD_DIR)hmac_signer_test.o : $(TESTCASES_DIR)hmac_signer_test.c $(TESTCASES_DIR)hmac_signer_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)scheduler_test.o
|
||||
$(BUILD_DIR)scheduler_test.o : $(TESTCASES_DIR)scheduler_test.c $(TESTCASES_DIR)scheduler_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)prf_plus_test.o
|
||||
$(BUILD_DIR)prf_plus_test.o : $(TESTCASES_DIR)prf_plus_test.c $(TESTCASES_DIR)prf_plus_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)send_queue_test.o
|
||||
$(BUILD_DIR)send_queue_test.o : $(TESTCASES_DIR)send_queue_test.c $(TESTCASES_DIR)send_queue_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)socket_test.o
|
||||
$(BUILD_DIR)socket_test.o : $(TESTCASES_DIR)socket_test.c $(TESTCASES_DIR)socket_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)packet_test.o
|
||||
$(BUILD_DIR)packet_test.o : $(TESTCASES_DIR)packet_test.c $(TESTCASES_DIR)packet_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)ike_sa_test.o
|
||||
$(BUILD_DIR)ike_sa_test.o : $(TESTCASES_DIR)ike_sa_test.c $(TESTCASES_DIR)ike_sa_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)sender_test.o
|
||||
$(BUILD_DIR)sender_test.o : $(TESTCASES_DIR)sender_test.c $(TESTCASES_DIR)sender_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)thread_pool_test.o
|
||||
$(BUILD_DIR)thread_pool_test.o : $(TESTCASES_DIR)thread_pool_test.c $(TESTCASES_DIR)thread_pool_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)encryption_payload_test.o
|
||||
$(BUILD_DIR)encryption_payload_test.o : $(TESTCASES_DIR)encryption_payload_test.c $(TESTCASES_DIR)encryption_payload_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)connection_test.o
|
||||
$(BUILD_DIR)connection_test.o : $(TESTCASES_DIR)connection_test.c $(TESTCASES_DIR)connection_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)policy_test.o
|
||||
$(BUILD_DIR)policy_test.o : $(TESTCASES_DIR)policy_test.c $(TESTCASES_DIR)policy_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)proposal_test.o
|
||||
$(BUILD_DIR)proposal_test.o : $(TESTCASES_DIR)proposal_test.c $(TESTCASES_DIR)proposal_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)rsa_test.o
|
||||
$(BUILD_DIR)rsa_test.o : $(TESTCASES_DIR)rsa_test.c $(TESTCASES_DIR)rsa_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)kernel_interface_test.o
|
||||
$(BUILD_DIR)kernel_interface_test.o : $(TESTCASES_DIR)kernel_interface_test.c $(TESTCASES_DIR)kernel_interface_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)child_sa_test.o
|
||||
$(BUILD_DIR)child_sa_test.o : $(TESTCASES_DIR)child_sa_test.c $(TESTCASES_DIR)child_sa_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)certificate_test.o
|
||||
$(BUILD_DIR)certificate_test.o : $(TESTCASES_DIR)certificate_test.c $(TESTCASES_DIR)certificate_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)leak_detective_test.o
|
||||
$(BUILD_DIR)leak_detective_test.o : $(TESTCASES_DIR)leak_detective_test.c $(TESTCASES_DIR)leak_detective_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
TEST_OBJS+= $(BUILD_DIR)identification_test.o
|
||||
$(BUILD_DIR)identification_test.o : $(TESTCASES_DIR)identification_test.c $(TESTCASES_DIR)identification_test.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright (C) 2005 Jan Hutter, Martin Willi
|
||||
# Hochschule fuer Technik Rapperswil
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
|
||||
THREADS_DIR= $(CHARON_DIR)threads/
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)receiver.o
|
||||
$(BUILD_DIR)receiver.o : $(THREADS_DIR)receiver.c $(THREADS_DIR)receiver.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)scheduler.o
|
||||
$(BUILD_DIR)scheduler.o : $(THREADS_DIR)scheduler.c $(THREADS_DIR)scheduler.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)sender.o
|
||||
$(BUILD_DIR)sender.o : $(THREADS_DIR)sender.c $(THREADS_DIR)sender.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)thread_pool.o
|
||||
$(BUILD_DIR)thread_pool.o : $(THREADS_DIR)thread_pool.c $(THREADS_DIR)thread_pool.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)kernel_interface.o
|
||||
$(BUILD_DIR)kernel_interface.o :$(THREADS_DIR)kernel_interface.c $(THREADS_DIR)kernel_interface.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
CHARON_OBJS+= $(BUILD_DIR)stroke_interface.o
|
||||
$(BUILD_DIR)stroke_interface.o :$(THREADS_DIR)stroke_interface.c $(THREADS_DIR)stroke_interface.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
|
@ -1,28 +0,0 @@
|
|||
# Makefile for miscelaneous programs
|
||||
# Copyright (C) 2002 Michael Richardson <mcr@freeswan.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# RCSID $Id: Makefile,v 1.2 2006/02/10 11:27:31 as Exp $
|
||||
|
||||
FREESWANSRCDIR=../..
|
||||
include ${FREESWANSRCDIR}/Makefile.inc
|
||||
|
||||
PROGRAM=ipsec
|
||||
PROGRAMDIR=${SBINDIR}
|
||||
MANPROGPREFIX:=./
|
||||
LIBFILES:=$(wildcard distro.txt)
|
||||
|
||||
include ../Makefile.program
|
||||
|
||||
install:: ipsec
|
||||
@$(INSTALL) $(INSTBINFLAGS) ipsec $(RCDIR)/ipsec
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
sbin_SCRIPTS = ipsec
|
||||
CLEANFILES = ipsec
|
||||
dist_man8_MANS = ipsec.8
|
||||
EXTRA_DIST = ipsec.in
|
||||
|
||||
ipsec : ipsec.in
|
||||
sed \
|
||||
-e "s:@IPSEC_VERSION@:$(PACKAGE_VERSION):" \
|
||||
-e "s:@IPSEC_NAME@:$(PACKAGE_NAME):" \
|
||||
-e "s:@IPSEC_DISTRO@::" \
|
||||
-e "s:@IPSEC_DIR@:$(ipsecdir):" \
|
||||
-e "s:@IPSEC_SBINDIR@:$(sbindir):" \
|
||||
-e "s:@IPSEC_CONFDIR@:$(confdir):" \
|
||||
-e "s:@IPSEC_PIDDIR@:$(piddir):" \
|
||||
$< > $@
|
||||
chmod +x $@
|
|
@ -313,10 +313,16 @@ The
|
|||
command sets them if they are not already set.
|
||||
.nf
|
||||
.na
|
||||
IPSEC_EXECDIR directory containing published commands
|
||||
IPSEC_LIBDIR directory containing internal executables
|
||||
IPSEC_SBINDIR directory containing \fBipsec\fP command
|
||||
IPSEC_CONFS directory containing configuration files
|
||||
|
||||
IPSEC_DIR directory containing ipsec programs and utilities
|
||||
IPSEC_SBINDIR directory containing \fBipsec\fP command
|
||||
IPSEC_CONFDIR directory containing configuration files
|
||||
IPSEC_PIDDIR directory containing PID files
|
||||
IPSEC_NAME name of ipsec distribution
|
||||
IPSEC_VERSION version numer of ipsec userland and kernel
|
||||
IPSEC_STARTER_PID PID file for ipsec starter
|
||||
IPSEC_PLUTO_PID PID file for IKEv1 keying daemon
|
||||
IPSEC_CHARON_PID PID file for IKEv2 keying daemon
|
||||
.ad
|
||||
.fi
|
||||
.SH SEE ALSO
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# prefix command to run stuff from our programs directory
|
||||
# Copyright (C) 1998-2002 Henry Spencer.
|
||||
# Copyright (C) 2006 Andreas Steffen
|
||||
# Copyright (C) 2006 Martin Willi
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
|
@ -15,58 +16,28 @@
|
|||
#
|
||||
# RCSID $Id: ipsec.in,v 1.13 2006/03/09 20:09:33 as Exp $
|
||||
|
||||
IPSEC_NAME=strongSwan
|
||||
# name and version of the ipsec implementation
|
||||
IPSEC_NAME="@IPSEC_NAME@"
|
||||
IPSEC_VERSION="U@IPSEC_VERSION@/K`uname -r`"
|
||||
|
||||
# where the private directory and the config files are
|
||||
IPSEC_EXECDIR="${IPSEC_EXECDIR-@IPSEC_EXECDIR@}"
|
||||
IPSEC_LIBDIR="${IPSEC_LIBDIR-@IPSEC_LIBDIR@}"
|
||||
IPSEC_SBINDIR="${IPSEC_SBINDIR-@IPSEC_SBINDIR@}"
|
||||
IPSEC_CONFS="${IPSEC_CONFS-@IPSEC_CONFS@}"
|
||||
IPSEC_DIR="@IPSEC_DIR@"
|
||||
IPSEC_SBINDIR="@IPSEC_SBINDIR@"
|
||||
IPSEC_CONFDIR="@IPSEC_CONFDIR@"
|
||||
IPSEC_PIDDIR="@IPSEC_PIDDIR@"
|
||||
|
||||
IPSEC_DIR="$IPSEC_LIBDIR"
|
||||
export IPSEC_DIR IPSEC_CONFS IPSEC_LIBDIR IPSEC_EXECDIR
|
||||
IPSEC_STARTER_PID="${IPSEC_PIDDIR}/starter.pid"
|
||||
IPSEC_PLUTO_PID="${IPSEC_PIDDIR}/pluto.pid"
|
||||
IPSEC_CHARON_PID="${IPSEC_PIDDIR}/charon.pid"
|
||||
|
||||
IPSEC_STARTER_PID="/var/run/starter.pid"
|
||||
IPSEC_PLUTO_PID="/var/run/pluto.pid"
|
||||
IPSEC_CHARON_PID="/var/run/charon.pid"
|
||||
IPSEC_WHACK="${IPSEC_DIR}/whack"
|
||||
IPSEC_STROKE="${IPSEC_DIR}/stroke"
|
||||
IPSEC_STARTER="${IPSEC_DIR}/starter"
|
||||
|
||||
# standardize PATH, and export it for everything else's benefit
|
||||
PATH="${IPSEC_SBINDIR}":/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin
|
||||
export PATH
|
||||
export IPSEC_DIR IPSEC_SBINDIR IPSEC_CONFDIR IPSEC_PIDDIR IPSEC_VERSION IPSEC_NAME IPSEC_STARTER_PID IPSEC_PLUTO_PID IPSEC_CHARON_PID
|
||||
|
||||
# things not to be listed in --help command list
|
||||
DONTMENTION='^(ipsec|_.*|.*\.old|.*~)$'
|
||||
|
||||
# version numbering (details filled in by build)
|
||||
# Possibly should call a C program to invoke the version_code() function
|
||||
# instead, but for performance's sake, we inline it here (and only here).
|
||||
version="xxx"
|
||||
|
||||
# export the version information
|
||||
IPSEC_VERSION="$version"
|
||||
export IPSEC_VERSION
|
||||
|
||||
# function for the funky user/kernel version stuff
|
||||
fixversion() {
|
||||
if test -f /proc/net/ipsec_version
|
||||
then
|
||||
stack=" (KLIPS)"
|
||||
kv="`awk '{print $NF}' /proc/net/ipsec_version`"
|
||||
else
|
||||
if test -f /proc/net/pfkey
|
||||
then
|
||||
stack=" (native)"
|
||||
kv="`uname -r`"
|
||||
else
|
||||
kv="(no kernel code presently loaded)"
|
||||
fi
|
||||
fi
|
||||
if test " $kv" != " $version"
|
||||
then
|
||||
version="U$version/K$kv"
|
||||
fi
|
||||
version="$version$stack"
|
||||
}
|
||||
IPSEC_DISTRO="Distributed by the Institute of Internet Technologies and Applications
|
||||
University of Applied Sciences Rapperswil, Switzerland (ITA-HSR)"
|
||||
|
||||
case "$1" in
|
||||
'')
|
||||
|
@ -102,13 +73,13 @@ case "$1" in
|
|||
echo " starter"
|
||||
echo " version"
|
||||
echo " whack"
|
||||
echo " stoke"
|
||||
echo
|
||||
echo "Some of these functions have their own manual pages, e.g. ipsec_scepclient(8)."
|
||||
exit 0
|
||||
;;
|
||||
--versioncode)
|
||||
fixversion
|
||||
echo "$version"
|
||||
echo "$IPSEC_VERSION"
|
||||
exit 0
|
||||
;;
|
||||
--copyright)
|
||||
|
@ -120,18 +91,18 @@ case "$1" in
|
|||
exit 0
|
||||
;;
|
||||
--confdir)
|
||||
echo "$IPSEC_CONFS"
|
||||
echo "$IPSEC_CONFDIR"
|
||||
exit 0
|
||||
;;
|
||||
down)
|
||||
shift
|
||||
if test -e $IPSEC_PLUTO_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/whack --name "$1" --terminate
|
||||
$IPSEC_WHACK --name "$1" --terminate
|
||||
fi
|
||||
if test -e $IPSEC_CHARON_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/stroke down "$1"
|
||||
$IPSEC_STROKE down "$1"
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
|
@ -145,11 +116,11 @@ rereadacerts|rereadcrls|rereadall)
|
|||
shift
|
||||
if test -e $IPSEC_PLUTO_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/whack "$@" "--$op"
|
||||
$IPSEC_WHACK "$@" "--$op"
|
||||
fi
|
||||
#if test -e $IPSEC_CHARON_PID
|
||||
#then
|
||||
# $IPSEC_EXECDIR/stroke "$op"
|
||||
# $IPSEC_STROKE "$op"
|
||||
#fi
|
||||
exit 0
|
||||
;;
|
||||
|
@ -157,7 +128,7 @@ ready)
|
|||
shift
|
||||
if test -e $IPSEC_PLUTO_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/whack --listen
|
||||
$IPSEC_WHACK --listen
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
|
@ -183,7 +154,7 @@ route|unroute)
|
|||
shift
|
||||
if test -e $IPSEC_PLUTO_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/whack --name "$1" "--$op"
|
||||
$IPSEC_WHACK --name "$1" "--$op"
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
|
@ -192,20 +163,20 @@ scencrypt|scdecrypt)
|
|||
shift
|
||||
if test -e $IPSEC_PLUTO_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/whack "--$op" "$@"
|
||||
$IPSEC_WHACK "--$op" "$@"
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
secrets)
|
||||
if test -e $IPSEC_PLUTO_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/whack --rereadsecrets
|
||||
$IPSEC_WHACK --rereadsecrets
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
start)
|
||||
shift
|
||||
exec $IPSEC_EXECDIR/starter "$@"
|
||||
exec $IPSEC_STARTER "$@"
|
||||
;;
|
||||
status|statusall)
|
||||
op="$1"
|
||||
|
@ -214,20 +185,20 @@ status|statusall)
|
|||
then
|
||||
if test -e $IPSEC_PLUTO_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/whack "--$op"
|
||||
$IPSEC_WHACK "--$op"
|
||||
fi
|
||||
if test -e $IPSEC_CHARON_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/stroke "$op"
|
||||
$IPSEC_STROKE "$op"
|
||||
fi
|
||||
else
|
||||
if test -e $IPSEC_PLUTO_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/whack --name "$1" "--$op"
|
||||
$IPSEC_WHACK --name "$1" "--$op"
|
||||
fi
|
||||
if test -e $IPSEC_CHARON_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/stroke "$op" "$1"
|
||||
$IPSEC_STROKE "$op" "$1"
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
|
@ -246,11 +217,11 @@ up)
|
|||
shift
|
||||
if test -e $IPSEC_PLUTO_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/whack --name "$1" --initiate
|
||||
$IPSEC_WHACK --name "$1" --initiate
|
||||
fi
|
||||
if test -e $IPSEC_CHARON_PID
|
||||
then
|
||||
$IPSEC_EXECDIR/stroke up "$1"
|
||||
$IPSEC_STROKE up "$1"
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
|
@ -265,13 +236,9 @@ update)
|
|||
exit 0
|
||||
;;
|
||||
version|--version)
|
||||
fixversion
|
||||
echo "Linux $IPSEC_NAME $version"
|
||||
echo "Linux $IPSEC_NAME $IPSEC_VERSION"
|
||||
echo "See \`ipsec --copyright' for copyright information."
|
||||
if [ -f $IPSEC_LIBDIR/distro.txt ]
|
||||
then
|
||||
cat $IPSEC_LIBDIR/distro.txt
|
||||
fi
|
||||
echo $IPSEC_DISTRO
|
||||
exit 0
|
||||
;;
|
||||
--*)
|
||||
|
@ -283,11 +250,11 @@ esac
|
|||
cmd="$1"
|
||||
shift
|
||||
|
||||
path="$IPSEC_EXECDIR/$cmd"
|
||||
path="$IPSEC_DIR/$cmd"
|
||||
|
||||
if test ! -x "$path"
|
||||
then
|
||||
path="$IPSEC_LIBDIR/$cmd"
|
||||
path="$IPSEC_DIR/$cmd"
|
||||
if test ! -x "$path"
|
||||
then
|
||||
echo "$0: unknown IPsec command \`$cmd' (\`ipsec --help' for list)" >&2
|
||||
|
|
|
@ -1,2 +1,45 @@
|
|||
noinst_LIBRARIES = libcrypto.a
|
||||
libcrypto_a_LIBADD = libaes/libaes.a libblowfish/libblowfish.a libdes/libdes.a libserpent/libserpent.a libsha2/libsha2.a libtwofish/libtwofish.a
|
||||
libcrypto_a_SOURCES = \
|
||||
libaes/aes_xcbc_mac.c \
|
||||
libaes/aes_cbc.c \
|
||||
libaes/aes_xcbc_mac.h \
|
||||
libaes/aes_cbc.h \
|
||||
libaes/aes.c \
|
||||
libaes/aes.h \
|
||||
include/md32_common.h \
|
||||
include/cbc_generic.h \
|
||||
include/hmac_generic.h \
|
||||
libblowfish/bf_skey.c \
|
||||
libblowfish/blowfish.h \
|
||||
libblowfish/bf_pi.h \
|
||||
libblowfish/bf_locl.h \
|
||||
libblowfish/bf_enc.c \
|
||||
libsha2/hmac_sha2.c \
|
||||
libsha2/sha2.h \
|
||||
libsha2/hmac_sha2.h \
|
||||
libsha2/sha2.c \
|
||||
libserpent/serpent_cbc.c \
|
||||
libserpent/serpent_cbc.h \
|
||||
libserpent/serpent.c \
|
||||
libserpent/serpent.h \
|
||||
libtwofish/twofish_cbc.h \
|
||||
libtwofish/twofish_cbc.c \
|
||||
libtwofish/twofish.c \
|
||||
libtwofish/twofish.h \
|
||||
libdes/des_enc.c \
|
||||
libdes/podd.h \
|
||||
libdes/sk.h \
|
||||
libdes/set_key.c \
|
||||
libdes/speed.c \
|
||||
libdes/fcrypt_b.c \
|
||||
libdes/fcrypt.c \
|
||||
libdes/destest.c \
|
||||
libdes/spr.h \
|
||||
libdes/cbc_enc.c \
|
||||
libdes/ecb_enc.c \
|
||||
libdes/des_opts.c \
|
||||
libdes/des_locl.h \
|
||||
libdes/des_ver.h \
|
||||
libdes/des.h
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libcrypto/include
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
noinst_LIBRARIES = libaes.a
|
||||
libaes_a_SOURCES = aes_xcbc_mac.c aes_cbc.c aes.c
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
noinst_LIBRARIES = libblowfish.a
|
||||
libblowfish_a_SOURCES = bf_skey.c bf_enc.c
|
||||
|
|
@ -1,422 +0,0 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# src/libfreeswan/libcrypto/libdes/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ../../../..
|
||||
|
||||
pkgdatadir = $(datadir)/strongSwan
|
||||
pkglibdir = $(libdir)/strongSwan
|
||||
pkgincludedir = $(includedir)/strongSwan
|
||||
top_builddir = ../../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = /usr/bin/install -c
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = i686-pc-linux-gnu
|
||||
host_triplet = i686-pc-linux-gnu
|
||||
subdir = src/libfreeswan/libcrypto/libdes
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libdes_a_AR = $(AR) $(ARFLAGS)
|
||||
libdes_a_LIBADD =
|
||||
am_libdes_a_OBJECTS = cbc_enc.$(OBJEXT) ecb_enc.$(OBJEXT) \
|
||||
des_enc.$(OBJEXT) fcrypt_b.$(OBJEXT) fcrypt.$(OBJEXT) \
|
||||
set_key.$(OBJEXT)
|
||||
libdes_a_OBJECTS = $(am_libdes_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libdes_a_SOURCES)
|
||||
DIST_SOURCES = $(libdes_a_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /home/mwilli/strongswan/trunk/missing --run aclocal-1.9
|
||||
AMDEP_FALSE = #
|
||||
AMDEP_TRUE =
|
||||
AMTAR = ${SHELL} /home/mwilli/strongswan/trunk/missing --run tar
|
||||
AR = ar
|
||||
AUTOCONF = ${SHELL} /home/mwilli/strongswan/trunk/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/mwilli/strongswan/trunk/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/mwilli/strongswan/trunk/missing --run automake-1.9
|
||||
AWK = gawk
|
||||
CC = gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -g -O2
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CXX = g++
|
||||
CXXCPP = g++ -E
|
||||
CXXDEPMODE = depmode=gcc3
|
||||
CXXFLAGS = -g -O2
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"strongSwan\" -DVERSION=\"4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
|
||||
DEPDIR = .deps
|
||||
ECHO = echo
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = grep -E
|
||||
EXEEXT =
|
||||
F77 =
|
||||
FFLAGS =
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
|
||||
LDFLAGS =
|
||||
LIBOBJS =
|
||||
LIBS =
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LN_S = ln -s
|
||||
LTLIBOBJS =
|
||||
MAKEINFO = ${SHELL} /home/mwilli/strongswan/trunk/missing --run makeinfo
|
||||
OBJEXT = o
|
||||
PACKAGE = strongSwan
|
||||
PACKAGE_BUGREPORT =
|
||||
PACKAGE_NAME =
|
||||
PACKAGE_STRING =
|
||||
PACKAGE_TARNAME =
|
||||
PACKAGE_VERSION =
|
||||
PATH_SEPARATOR = :
|
||||
RANLIB = ranlib
|
||||
SET_MAKE =
|
||||
SHELL = /bin/sh
|
||||
STRIP = strip
|
||||
VERSION = 4.0
|
||||
ac_ct_AR = ar
|
||||
ac_ct_CC = gcc
|
||||
ac_ct_CXX = g++
|
||||
ac_ct_F77 =
|
||||
ac_ct_RANLIB = ranlib
|
||||
ac_ct_STRIP = strip
|
||||
am__fastdepCC_FALSE = #
|
||||
am__fastdepCC_TRUE =
|
||||
am__fastdepCXX_FALSE = #
|
||||
am__fastdepCXX_TRUE =
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
am__tar = ${AMTAR} chof - "$$tardir"
|
||||
am__untar = ${AMTAR} xf -
|
||||
bindir = ${exec_prefix}/bin
|
||||
build = i686-pc-linux-gnu
|
||||
build_alias =
|
||||
build_cpu = i686
|
||||
build_os = linux-gnu
|
||||
build_vendor = pc
|
||||
datadir = ${prefix}/share
|
||||
exec_prefix = ${prefix}
|
||||
host = i686-pc-linux-gnu
|
||||
host_alias =
|
||||
host_cpu = i686
|
||||
host_os = linux-gnu
|
||||
host_vendor = pc
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${prefix}/info
|
||||
install_sh = /home/mwilli/strongswan/trunk/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${prefix}/man
|
||||
mkdir_p = mkdir -p --
|
||||
oldincludedir = /usr/include
|
||||
prefix = /usr/local
|
||||
program_transform_name = s,x,x,
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
sysconfdir = ${prefix}/etc
|
||||
target_alias =
|
||||
noinst_LIBRARIES = libdes.a
|
||||
libdes_a_SOURCES = cbc_enc.c ecb_enc.c des_enc.c fcrypt_b.c fcrypt.c set_key.c
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libfreeswan/libcrypto/libdes/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/libfreeswan/libcrypto/libdes/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libdes.a: $(libdes_a_OBJECTS) $(libdes_a_DEPENDENCIES)
|
||||
-rm -f libdes.a
|
||||
$(libdes_a_AR) libdes.a $(libdes_a_OBJECTS) $(libdes_a_LIBADD)
|
||||
$(RANLIB) libdes.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
include ./$(DEPDIR)/cbc_enc.Po
|
||||
include ./$(DEPDIR)/des_enc.Po
|
||||
include ./$(DEPDIR)/ecb_enc.Po
|
||||
include ./$(DEPDIR)/fcrypt.Po
|
||||
include ./$(DEPDIR)/fcrypt_b.Po
|
||||
include ./$(DEPDIR)/set_key.Po
|
||||
|
||||
.c.o:
|
||||
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
# source='$<' object='$@' libtool=no \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
# source='$<' object='$@' libtool=yes \
|
||||
# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
|
||||
# $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -1,3 +0,0 @@
|
|||
noinst_LIBRARIES = libdes.a
|
||||
libdes_a_SOURCES = cbc_enc.c ecb_enc.c des_enc.c fcrypt_b.c fcrypt.c set_key.c
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
noinst_LIBRARIES = libserpent.a
|
||||
libserpent_a_SOURCES = serpent.c serpent_cbc.c
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
noinst_LIBRARIES = libsha2.a
|
||||
libsha2_a_SOURCES = hmac_sha2.c sha2.c
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
noinst_LIBRARIES = libtwofish.a
|
||||
libtwofish_a_SOURCES = twofish.c twofish_cbc.c
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
des_opts
|
||||
destest
|
||||
speed
|
|
@ -1,174 +0,0 @@
|
|||
# FreeS/WAN library
|
||||
# Copyright (C) 1998-2001 Henry Spencer.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# RCSID $Id: Makefile,v 1.2 2004/03/22 21:53:17 as Exp $
|
||||
|
||||
|
||||
FREESWANSRCDIR=../..
|
||||
|
||||
include ${FREESWANSRCDIR}/Makefile.inc
|
||||
include ${FREESWANSRCDIR}/Makefile.ver
|
||||
|
||||
|
||||
MANDIR=$(MANTREE)/man3
|
||||
|
||||
SRCS=addrtoa.c addrtot.c addrtypeof.c anyaddr.c atoaddr.c \
|
||||
atoasr.c atosa.c atosubnet.c atoul.c copyright.c datatot.c \
|
||||
goodmask.c initaddr.c initsaid.c initsubnet.c keyblobtoid.c \
|
||||
optionsfrom.c pfkey_v2_build.c pfkey_v2_ext_bits.c pfkey_v2_parse.c \
|
||||
pfkey_v2_debug.c prng.c \
|
||||
portof.c rangetoa.c rangetosubnet.c sameaddr.c \
|
||||
satoa.c satot.c subnetof.c subnettoa.c subnettot.c \
|
||||
subnettypeof.c ttoaddr.c ttodata.c ttoprotoport.c \
|
||||
ttosa.c ttosubnet.c ttoul.c ultoa.c ultot.c
|
||||
|
||||
OBJS=${SRCS:.c=.o} version.o
|
||||
|
||||
KLIPSD=${FREESWANSRCDIR}/linux/include
|
||||
SRCDIR=${FREESWANSRCDIR}/linux/lib/libfreeswan
|
||||
|
||||
VPATH = ${SRCDIR}
|
||||
|
||||
HDRS=${KLIPSD}/freeswan.h ${SRCDIR}/internal.h
|
||||
|
||||
LIB=libfreeswan.a
|
||||
# Original flags
|
||||
CFLAGS=-I. -I${SRCDIR} -I${KLIPSD} -I${FREESWANSRCDIR} $(USERCOMPILE)
|
||||
CFLAGS+= -Wall
|
||||
#CFLAGS+= -Wconversion
|
||||
#CFLAGS+= -Wmissing-prototypes
|
||||
CFLAGS+= -Wpointer-arith
|
||||
CFLAGS+= -Wcast-qual
|
||||
#CFLAGS+= -Wmissing-declarations
|
||||
CFLAGS+= -Wstrict-prototypes
|
||||
#CFLAGS+= -pedantic
|
||||
#CFLAGS+= -W
|
||||
#CFLAGS+= -Wwrite-strings
|
||||
CFLAGS+= -Wbad-function-cast
|
||||
CFLAGS+= -DNAT_TRAVERSAL
|
||||
|
||||
|
||||
ARFLAGS=crvs
|
||||
EXTHDRS=des.h
|
||||
EXTLIBS=libdes.a
|
||||
MANS=anyaddr.3 atoaddr.3 atoasr.3 atosa.3 atoul.3 goodmask.3 \
|
||||
initaddr.3 initsubnet.3 optionsfrom.3 portof.3 rangetosubnet.3 \
|
||||
sameaddr.3 subnetof.3 ttoaddr.3 ttodata.3 ttosa.3 ttoul.3 version.3
|
||||
|
||||
.PHONY: all install clean l t lt tar check depend checkprograms
|
||||
|
||||
all: $(LIB)
|
||||
programs: $(LIB)
|
||||
|
||||
install:
|
||||
@mkdir -p $(MANDIR)
|
||||
@for f in $(MANS) ; \
|
||||
do \
|
||||
$(INSTALL) $(INSTMANFLAGS) $(SRCDIR)/$$f $(MANDIR)/ipsec_$$f || exit 1 ; \
|
||||
done
|
||||
@$(FREESWANSRCDIR)/utils/manlink $(foreach man, $(MANS), ${SRCDIR}/$(man)) | \
|
||||
while read from to; \
|
||||
do \
|
||||
ln -s -f ipsec_$$from $(MANDIR)/$$to; \
|
||||
done
|
||||
|
||||
|
||||
install_file_list:
|
||||
@for f in $(MANS) ; \
|
||||
do \
|
||||
echo $(MANDIR)/ipsec_$$f;\
|
||||
done;
|
||||
@$(FREESWANSRCDIR)/utils/manlink $(foreach man, $(MANS), ${SRCDIR}/$(man)) | \
|
||||
while read from to; \
|
||||
do \
|
||||
echo $(MANDIR)/$$to; \
|
||||
done
|
||||
|
||||
$(LIB): $(OBJS)
|
||||
$(AR) $(ARFLAGS) $(LIB) $(OBJS)
|
||||
|
||||
$(OBJS): $(HDRS)
|
||||
|
||||
# build version.c using version number from Makefile.ver
|
||||
version.c: ${SRCDIR}/version.in.c ${FREESWANSRCDIR}/Makefile.ver
|
||||
sed '/"/s/xxx/$(IPSECVERSION)/' ${SRCDIR}/version.in.c >$@
|
||||
|
||||
#libdes.a: ../libdes/libdes.a
|
||||
# ln -f -s ../libdes/libdes.a
|
||||
#
|
||||
# yes, that's CFLAG=, not CFLAGS=
|
||||
#../libdes/libdes.a:
|
||||
# cd ../libdes ; \
|
||||
# if test " `arch | sed 's/^i[3456]/x/'`" = " x86" ; \
|
||||
# then $(MAKE) CC='$(CC)' CFLAG='$(CFLAGS)' TESTING='' x86-elf ; \
|
||||
# else $(MAKE) CC='$(CC)' CFLAG='$(CFLAGS)' libdes.a ; \
|
||||
# fi
|
||||
|
||||
clean:
|
||||
rm -f $(LIB) *.o try* core *.core $(EXTHDRS) $(EXTLIBS) version.c
|
||||
|
||||
|
||||
# developer-only stuff
|
||||
l:
|
||||
$(MAKE) $(LIB) ARFLAGS=crv CFLAGS=-O
|
||||
$(RANLIB) $(LIB)
|
||||
|
||||
t: $(LIB)
|
||||
ln -f -s ${SRCDIR}/atosubnet.c try.c
|
||||
${CC} ${CFLAGS} -DATOSUBNET_MAIN try.c $(LIB) -o try
|
||||
./try -r
|
||||
ln -f -s ${SRCDIR}/ttosubnet.c try1a.c
|
||||
${CC} ${CFLAGS} -DTTOSUBNET_MAIN try1a.c $(LIB) -o try1a
|
||||
./try1a -r
|
||||
ln -f -s ${SRCDIR}/ttodata.c try2.c
|
||||
${CC} ${CFLAGS} -DTTODATA_MAIN try2.c $(LIB) -o try2
|
||||
./try2 -r
|
||||
ln -f -s ${SRCDIR}/atoasr.c try3.c
|
||||
${CC} ${CFLAGS} -DATOASR_MAIN try3.c $(LIB) -o try3
|
||||
./try3 -r
|
||||
ln -f -s ${SRCDIR}/atosa.c try4.c
|
||||
${CC} ${CFLAGS} -DATOSA_MAIN try4.c $(LIB) -o try4
|
||||
./try4 -r
|
||||
ln -f -s ${SRCDIR}/ttosa.c try4a.c
|
||||
${CC} ${CFLAGS} -DTTOSA_MAIN try4a.c $(LIB) -o try4a
|
||||
./try4a -r
|
||||
ln -f -s ${SRCDIR}/rangetosubnet.c try6.c
|
||||
${CC} ${CFLAGS} -DRANGETOSUBNET_MAIN try6.c $(LIB) -o try6
|
||||
./try6 -r
|
||||
ln -f -s ${SRCDIR}/addrtot.c try7.c
|
||||
${CC} ${CFLAGS} -DADDRTOT_MAIN try7.c $(LIB) -o try7
|
||||
./try7 -r
|
||||
|
||||
lt: $(LIB)
|
||||
$(MAKE) t
|
||||
cp optionsfrom.c try5.c
|
||||
cc -DTEST try5.c $(LIB) -o try5
|
||||
echo --foo --bar >try5in1
|
||||
echo --optionsfrom >>try5in1
|
||||
echo try5in2 >>try5in1
|
||||
echo --foo >try5in2
|
||||
./try5 --foo --bar --optionsfrom try5in1 --bar something
|
||||
|
||||
tar: clean
|
||||
tar -cvf /tmp/lib.tar Makefile [a-z]*
|
||||
|
||||
check:
|
||||
echo no checks in lib right now.
|
||||
|
||||
depend:
|
||||
makedepend -Y -- $(CFLAGS) -- $(SRCS)
|
||||
|
||||
checkprograms:
|
||||
|
||||
# DO NOT DELETE
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
noinst_LIBRARIES = libfreeswan.a
|
||||
libfreeswan_a_SOURCES = addrtoa.c addrtot.c addrtypeof.c anyaddr.c atoaddr.c atoasr.c \
|
||||
atosa.c atosubnet.c atoul.c copyright.c datatot.c freeswan.h \
|
||||
goodmask.c initaddr.c initsaid.c initsubnet.c internal.h ipcomp.h \
|
||||
ipsec_ah.h ipsec_alg.h ipsec_encap.h ipsec_eroute.h ipsec_errs.h \
|
||||
ipsec_esp.h ipsec_ipe4.h ipsec_kversion.h ipsec_life.h ipsec_md5h.h \
|
||||
ipsec_param.h ipsec_policy.h ipsec_proto.h ipsec_radij.h ipsec_rcv.h \
|
||||
ipsec_sa.h ipsec_sha1.h ipsec_stats.h ipsec_tunnel.h ipsec_xform.h \
|
||||
ipsec_xmit.h keyblobtoid.c optionsfrom.c pfkey_v2_build.c pfkey_v2_debug.c \
|
||||
pfkey_v2_ext_bits.c pfkey_v2_parse.c portof.c prng.c radij.h rangetoa.c \
|
||||
pfkey.h pfkeyv2.h rangetosubnet.c sameaddr.c satoa.c \
|
||||
satot.c subnetof.c subnettoa.c subnettot.c \
|
||||
subnettypeof.c ttoaddr.c ttodata.c ttoprotoport.c ttosa.c ttosubnet.c ttoul.c \
|
||||
ultoa.c ultot.c version.c
|
||||
INCLUDES = -I$(top_srcdir)/src/pluto
|
||||
AM_CFLAGS = -DNAT_TRAVERSAL
|
||||
dist_man3_MANS = anyaddr.3 atoaddr.3 atoasr.3 atosa.3 atoul.3 goodmask.3 initaddr.3 initsubnet.3 \
|
||||
keyblobtoid.3 optionsfrom.3 portof.3 prng.3 rangetosubnet.3 sameaddr.3 subnetof.3 \
|
||||
ttoaddr.3 ttodata.3 ttosa.3 ttoul.3 version.3
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
obj-y += ultoa.o
|
||||
obj-y += addrtoa.o
|
||||
obj-y += subnettoa.o
|
||||
obj-y += subnetof.o
|
||||
obj-y += goodmask.o
|
||||
obj-y += datatot.o
|
||||
obj-y += rangetoa.o
|
||||
obj-y += satoa.o
|
||||
obj-y += prng.o
|
||||
obj-y += pfkey_v2_parse.o
|
||||
obj-y += pfkey_v2_build.o
|
||||
obj-y += pfkey_v2_debug.o
|
||||
obj-y += pfkey_v2_ext_bits.o
|
||||
obj-y += version.o
|
||||
|
||||
|
||||
version.c: ${LIBFREESWANDIR}/version.in.c ${FREESWANSRCDIR}/Makefile.ver
|
||||
sed '/"/s/xxx/$(IPSECVERSION)/' ${LIBFREESWANDIR}/version.in.c >$@
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#include <freeswan/ipsec_param.h>
|
||||
#include <ipsec_param.h>
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -0,0 +1,498 @@
|
|||
/*
|
||||
* FreeS/WAN specific PF_KEY headers
|
||||
* Copyright (C) 1999, 2000, 2001 Richard Guy Briggs.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* RCSID $Id: pfkey.h,v 1.2 2004/03/22 21:53:18 as Exp $
|
||||
*/
|
||||
|
||||
#ifndef __NET_IPSEC_PF_KEY_H
|
||||
#define __NET_IPSEC_PF_KEY_H
|
||||
#ifdef __KERNEL__
|
||||
extern struct proto_ops pfkey_proto_ops;
|
||||
typedef struct sock pfkey_sock;
|
||||
extern int debug_pfkey;
|
||||
|
||||
extern /* void */ int pfkey_init(void);
|
||||
extern /* void */ int pfkey_cleanup(void);
|
||||
|
||||
extern struct sock *pfkey_sock_list;
|
||||
struct socket_list
|
||||
{
|
||||
struct socket *socketp;
|
||||
struct socket_list *next;
|
||||
};
|
||||
extern int pfkey_list_insert_socket(struct socket*, struct socket_list**);
|
||||
extern int pfkey_list_remove_socket(struct socket*, struct socket_list**);
|
||||
extern struct socket_list *pfkey_open_sockets;
|
||||
extern struct socket_list *pfkey_registered_sockets[SADB_SATYPE_MAX+1];
|
||||
|
||||
/*
|
||||
* There is a field-by-field copy in klips/net/ipsec/ipsec_alg.h
|
||||
* please keep in sync until we migrate all support stuff
|
||||
* to ipsec_alg objects
|
||||
*/
|
||||
struct supported
|
||||
{
|
||||
uint16_t supported_alg_exttype;
|
||||
uint8_t supported_alg_id;
|
||||
uint8_t supported_alg_ivlen;
|
||||
uint16_t supported_alg_minbits;
|
||||
uint16_t supported_alg_maxbits;
|
||||
};
|
||||
extern struct supported_list *pfkey_supported_list[SADB_SATYPE_MAX+1];
|
||||
struct supported_list
|
||||
{
|
||||
struct supported *supportedp;
|
||||
struct supported_list *next;
|
||||
};
|
||||
extern int pfkey_list_insert_supported(struct supported*, struct supported_list**);
|
||||
extern int pfkey_list_remove_supported(struct supported*, struct supported_list**);
|
||||
|
||||
struct sockaddr_key
|
||||
{
|
||||
uint16_t key_family; /* PF_KEY */
|
||||
uint16_t key_pad; /* not used */
|
||||
uint32_t key_pid; /* process ID */
|
||||
};
|
||||
|
||||
struct pfkey_extracted_data
|
||||
{
|
||||
struct ipsec_sa* ips;
|
||||
struct ipsec_sa* ips2;
|
||||
struct eroute *eroute;
|
||||
};
|
||||
|
||||
extern int
|
||||
pfkey_alloc_eroute(struct eroute** eroute);
|
||||
|
||||
extern int
|
||||
pfkey_sa_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_lifetime_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_address_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_key_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_ident_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_sens_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_prop_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_supported_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_spirange_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_x_kmprivate_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_x_satype_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int
|
||||
pfkey_x_debug_process(struct sadb_ext *pfkey_ext,
|
||||
struct pfkey_extracted_data* extr);
|
||||
|
||||
extern int pfkey_register_reply(int satype, struct sadb_msg *);
|
||||
extern int pfkey_upmsg(struct socket *, struct sadb_msg *);
|
||||
extern int pfkey_expire(struct ipsec_sa *, int);
|
||||
extern int pfkey_acquire(struct ipsec_sa *);
|
||||
#else /* ! __KERNEL__ */
|
||||
|
||||
extern void (*pfkey_debug_func)(const char *message, ...);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
extern uint8_t satype2proto(uint8_t satype);
|
||||
extern uint8_t proto2satype(uint8_t proto);
|
||||
extern char* satype2name(uint8_t satype);
|
||||
extern char* proto2name(uint8_t proto);
|
||||
|
||||
struct key_opt
|
||||
{
|
||||
uint32_t key_pid; /* process ID */
|
||||
struct sock *sk;
|
||||
};
|
||||
|
||||
#define key_pid(sk) ((struct key_opt*)&((sk)->protinfo))->key_pid
|
||||
|
||||
#define IPSEC_PFKEYv2_ALIGN (sizeof(uint64_t)/sizeof(uint8_t))
|
||||
#define BITS_PER_OCTET 8
|
||||
#define OCTETBITS 8
|
||||
#define PFKEYBITS 64
|
||||
#define DIVUP(x,y) ((x + y -1) / y) /* divide, rounding upwards */
|
||||
#define ALIGN_N(x,y) (DIVUP(x,y) * y) /* align on y boundary */
|
||||
|
||||
#define PFKEYv2_MAX_MSGSIZE 4096
|
||||
|
||||
/*
|
||||
* PF_KEYv2 permitted and required extensions in and out bitmaps
|
||||
*/
|
||||
struct pf_key_ext_parsers_def {
|
||||
int (*parser)(struct sadb_ext*);
|
||||
char *parser_name;
|
||||
};
|
||||
|
||||
|
||||
extern unsigned int extensions_bitmaps[2/*in/out*/][2/*perm/req*/][SADB_MAX + 1/*ext*/];
|
||||
#define EXT_BITS_IN 0
|
||||
#define EXT_BITS_OUT 1
|
||||
#define EXT_BITS_PERM 0
|
||||
#define EXT_BITS_REQ 1
|
||||
|
||||
extern void pfkey_extensions_init(struct sadb_ext *extensions[SADB_EXT_MAX + 1]);
|
||||
extern void pfkey_extensions_free(struct sadb_ext *extensions[SADB_EXT_MAX + 1]);
|
||||
extern void pfkey_msg_free(struct sadb_msg **pfkey_msg);
|
||||
|
||||
extern int pfkey_msg_parse(struct sadb_msg *pfkey_msg,
|
||||
struct pf_key_ext_parsers_def *ext_parsers[],
|
||||
struct sadb_ext **extensions,
|
||||
int dir);
|
||||
|
||||
/*
|
||||
* PF_KEYv2 build function prototypes
|
||||
*/
|
||||
|
||||
int
|
||||
pfkey_msg_hdr_build(struct sadb_ext** pfkey_ext,
|
||||
uint8_t msg_type,
|
||||
uint8_t satype,
|
||||
uint8_t msg_errno,
|
||||
uint32_t seq,
|
||||
uint32_t pid);
|
||||
|
||||
int
|
||||
pfkey_sa_ref_build(struct sadb_ext ** pfkey_ext,
|
||||
uint16_t exttype,
|
||||
uint32_t spi, /* in network order */
|
||||
uint8_t replay_window,
|
||||
uint8_t sa_state,
|
||||
uint8_t auth,
|
||||
uint8_t encrypt,
|
||||
uint32_t flags,
|
||||
uint32_t/*IPsecSAref_t*/ ref);
|
||||
|
||||
int
|
||||
pfkey_sa_build(struct sadb_ext ** pfkey_ext,
|
||||
uint16_t exttype,
|
||||
uint32_t spi, /* in network order */
|
||||
uint8_t replay_window,
|
||||
uint8_t sa_state,
|
||||
uint8_t auth,
|
||||
uint8_t encrypt,
|
||||
uint32_t flags);
|
||||
|
||||
int
|
||||
pfkey_lifetime_build(struct sadb_ext ** pfkey_ext,
|
||||
uint16_t exttype,
|
||||
uint32_t allocations,
|
||||
uint64_t bytes,
|
||||
uint64_t addtime,
|
||||
uint64_t usetime,
|
||||
uint32_t packets);
|
||||
|
||||
int
|
||||
pfkey_address_build(struct sadb_ext** pfkey_ext,
|
||||
uint16_t exttype,
|
||||
uint8_t proto,
|
||||
uint8_t prefixlen,
|
||||
struct sockaddr* address);
|
||||
|
||||
int
|
||||
pfkey_key_build(struct sadb_ext** pfkey_ext,
|
||||
uint16_t exttype,
|
||||
uint16_t key_bits,
|
||||
char* key);
|
||||
|
||||
int
|
||||
pfkey_ident_build(struct sadb_ext** pfkey_ext,
|
||||
uint16_t exttype,
|
||||
uint16_t ident_type,
|
||||
uint64_t ident_id,
|
||||
uint8_t ident_len,
|
||||
char* ident_string);
|
||||
|
||||
#ifdef NAT_TRAVERSAL
|
||||
#ifdef __KERNEL__
|
||||
extern int pfkey_nat_t_new_mapping(struct ipsec_sa *, struct sockaddr *, __u16);
|
||||
extern int pfkey_x_nat_t_type_process(struct sadb_ext *pfkey_ext, struct pfkey_extracted_data* extr);
|
||||
extern int pfkey_x_nat_t_port_process(struct sadb_ext *pfkey_ext, struct pfkey_extracted_data* extr);
|
||||
#endif /* __KERNEL__ */
|
||||
int
|
||||
pfkey_x_nat_t_type_build(struct sadb_ext** pfkey_ext,
|
||||
uint8_t type);
|
||||
int
|
||||
pfkey_x_nat_t_port_build(struct sadb_ext** pfkey_ext,
|
||||
uint16_t exttype,
|
||||
uint16_t port);
|
||||
#endif
|
||||
|
||||
int
|
||||
pfkey_sens_build(struct sadb_ext** pfkey_ext,
|
||||
uint32_t dpd,
|
||||
uint8_t sens_level,
|
||||
uint8_t sens_len,
|
||||
uint64_t* sens_bitmap,
|
||||
uint8_t integ_level,
|
||||
uint8_t integ_len,
|
||||
uint64_t* integ_bitmap);
|
||||
|
||||
int pfkey_x_protocol_build(struct sadb_ext **, uint8_t);
|
||||
|
||||
|
||||
int
|
||||
pfkey_prop_build(struct sadb_ext** pfkey_ext,
|
||||
uint8_t replay,
|
||||
unsigned int comb_num,
|
||||
struct sadb_comb* comb);
|
||||
|
||||
int
|
||||
pfkey_supported_build(struct sadb_ext** pfkey_ext,
|
||||
uint16_t exttype,
|
||||
unsigned int alg_num,
|
||||
struct sadb_alg* alg);
|
||||
|
||||
int
|
||||
pfkey_spirange_build(struct sadb_ext** pfkey_ext,
|
||||
uint16_t exttype,
|
||||
uint32_t min,
|
||||
uint32_t max);
|
||||
|
||||
int
|
||||
pfkey_x_kmprivate_build(struct sadb_ext** pfkey_ext);
|
||||
|
||||
int
|
||||
pfkey_x_satype_build(struct sadb_ext** pfkey_ext,
|
||||
uint8_t satype);
|
||||
|
||||
int
|
||||
pfkey_x_debug_build(struct sadb_ext** pfkey_ext,
|
||||
uint32_t tunnel,
|
||||
uint32_t netlink,
|
||||
uint32_t xform,
|
||||
uint32_t eroute,
|
||||
uint32_t spi,
|
||||
uint32_t radij,
|
||||
uint32_t esp,
|
||||
uint32_t ah,
|
||||
uint32_t rcv,
|
||||
uint32_t pfkey,
|
||||
uint32_t ipcomp,
|
||||
uint32_t verbose);
|
||||
|
||||
int
|
||||
pfkey_msg_build(struct sadb_msg** pfkey_msg,
|
||||
struct sadb_ext* extensions[],
|
||||
int dir);
|
||||
|
||||
/* in pfkey_v2_debug.c - routines to decode numbers -> strings */
|
||||
const char *
|
||||
pfkey_v2_sadb_ext_string(int extnum);
|
||||
|
||||
const char *
|
||||
pfkey_v2_sadb_type_string(int sadb_type);
|
||||
|
||||
|
||||
#endif /* __NET_IPSEC_PF_KEY_H */
|
||||
|
||||
/*
|
||||
* $Log: pfkey.h,v $
|
||||
* Revision 1.2 2004/03/22 21:53:18 as
|
||||
* merged alg-0.8.1 branch with HEAD
|
||||
*
|
||||
* Revision 1.1.2.1.2.1 2004/03/16 09:48:18 as
|
||||
* alg-0.8.1rc12 patch merged
|
||||
*
|
||||
* Revision 1.1.2.1 2004/03/15 22:30:06 as
|
||||
* nat-0.6c patch merged
|
||||
*
|
||||
* Revision 1.1 2004/03/15 20:35:25 as
|
||||
* added files from freeswan-2.04-x509-1.5.3
|
||||
*
|
||||
* Revision 1.42 2003/08/25 22:08:19 mcr
|
||||
* removed pfkey_proto_init() from pfkey.h for 2.6 support.
|
||||
*
|
||||
* Revision 1.41 2003/05/07 17:28:57 mcr
|
||||
* new function pfkey_debug_func added for us in debugging from
|
||||
* pfkey library.
|
||||
*
|
||||
* Revision 1.40 2003/01/30 02:31:34 rgb
|
||||
*
|
||||
* Convert IPsecSAref_t from signed to unsigned to fix apparent SAref exhaustion bug.
|
||||
*
|
||||
* Revision 1.39 2002/09/20 15:40:21 rgb
|
||||
* Switch from pfkey_alloc_ipsec_sa() to ipsec_sa_alloc().
|
||||
* Added ref parameter to pfkey_sa_build().
|
||||
* Cleaned out unused cruft.
|
||||
*
|
||||
* Revision 1.38 2002/05/14 02:37:24 rgb
|
||||
* Change all references to tdb, TDB or Tunnel Descriptor Block to ips,
|
||||
* ipsec_sa or ipsec_sa.
|
||||
* Added function prototypes for the functions moved to
|
||||
* pfkey_v2_ext_process.c.
|
||||
*
|
||||
* Revision 1.37 2002/04/24 07:36:49 mcr
|
||||
* Moved from ./lib/pfkey.h,v
|
||||
*
|
||||
* Revision 1.36 2002/01/20 20:34:49 mcr
|
||||
* added pfkey_v2_sadb_type_string to decode sadb_type to string.
|
||||
*
|
||||
* Revision 1.35 2001/11/27 05:27:47 mcr
|
||||
* pfkey parses are now maintained by a structure
|
||||
* that includes their name for debug purposes.
|
||||
*
|
||||
* Revision 1.34 2001/11/26 09:23:53 rgb
|
||||
* Merge MCR's ipsec_sa, eroute, proc and struct lifetime changes.
|
||||
*
|
||||
* Revision 1.33 2001/11/06 19:47:47 rgb
|
||||
* Added packet parameter to lifetime and comb structures.
|
||||
*
|
||||
* Revision 1.32 2001/09/08 21:13:34 rgb
|
||||
* Added pfkey ident extension support for ISAKMPd. (NetCelo)
|
||||
*
|
||||
* Revision 1.31 2001/06/14 19:35:16 rgb
|
||||
* Update copyright date.
|
||||
*
|
||||
* Revision 1.30 2001/02/27 07:04:52 rgb
|
||||
* Added satype2name prototype.
|
||||
*
|
||||
* Revision 1.29 2001/02/26 19:59:33 rgb
|
||||
* Ditch unused sadb_satype2proto[], replaced by satype2proto().
|
||||
*
|
||||
* Revision 1.28 2000/10/10 20:10:19 rgb
|
||||
* Added support for debug_ipcomp and debug_verbose to klipsdebug.
|
||||
*
|
||||
* Revision 1.27 2000/09/21 04:20:45 rgb
|
||||
* Fixed array size off-by-one error. (Thanks Svenning!)
|
||||
*
|
||||
* Revision 1.26 2000/09/12 03:26:05 rgb
|
||||
* Added pfkey_acquire prototype.
|
||||
*
|
||||
* Revision 1.25 2000/09/08 19:21:28 rgb
|
||||
* Fix pfkey_prop_build() parameter to be only single indirection.
|
||||
*
|
||||
* Revision 1.24 2000/09/01 18:46:42 rgb
|
||||
* Added a supported algorithms array lists, one per satype and registered
|
||||
* existing algorithms.
|
||||
* Fixed pfkey_list_{insert,remove}_{socket,support}() to allow change to
|
||||
* list.
|
||||
*
|
||||
* Revision 1.23 2000/08/27 01:55:26 rgb
|
||||
* Define OCTETBITS and PFKEYBITS to avoid using 'magic' numbers in code.
|
||||
*
|
||||
* Revision 1.22 2000/08/20 21:39:23 rgb
|
||||
* Added kernel prototypes for kernel funcitions pfkey_upmsg() and
|
||||
* pfkey_expire().
|
||||
*
|
||||
* Revision 1.21 2000/08/15 17:29:23 rgb
|
||||
* Fixes from SZI to untested pfkey_prop_build().
|
||||
*
|
||||
* Revision 1.20 2000/05/10 20:14:19 rgb
|
||||
* Fleshed out sensitivity, proposal and supported extensions.
|
||||
*
|
||||
* Revision 1.19 2000/03/16 14:07:23 rgb
|
||||
* Renamed ALIGN macro to avoid fighting with others in kernel.
|
||||
*
|
||||
* Revision 1.18 2000/01/22 23:24:06 rgb
|
||||
* Added prototypes for proto2satype(), satype2proto() and proto2name().
|
||||
*
|
||||
* Revision 1.17 2000/01/21 06:26:59 rgb
|
||||
* Converted from double tdb arguments to one structure (extr)
|
||||
* containing pointers to all temporary information structures.
|
||||
* Added klipsdebug switching capability.
|
||||
* Dropped unused argument to pfkey_x_satype_build().
|
||||
*
|
||||
* Revision 1.16 1999/12/29 21:17:41 rgb
|
||||
* Changed pfkey_msg_build() I/F to include a struct sadb_msg**
|
||||
* parameter for cleaner manipulation of extensions[] and to guard
|
||||
* against potential memory leaks.
|
||||
* Changed the I/F to pfkey_msg_free() for the same reason.
|
||||
*
|
||||
* Revision 1.15 1999/12/09 23:12:54 rgb
|
||||
* Added macro for BITS_PER_OCTET.
|
||||
* Added argument to pfkey_sa_build() to do eroutes.
|
||||
*
|
||||
* Revision 1.14 1999/12/08 20:33:25 rgb
|
||||
* Changed sa_family_t to uint16_t for 2.0.xx compatibility.
|
||||
*
|
||||
* Revision 1.13 1999/12/07 19:53:40 rgb
|
||||
* Removed unused first argument from extension parsers.
|
||||
* Changed __u* types to uint* to avoid use of asm/types.h and
|
||||
* sys/types.h in userspace code.
|
||||
* Added function prototypes for pfkey message and extensions
|
||||
* initialisation and cleanup.
|
||||
*
|
||||
* Revision 1.12 1999/12/01 22:19:38 rgb
|
||||
* Change pfkey_sa_build to accept an SPI in network byte order.
|
||||
*
|
||||
* Revision 1.11 1999/11/27 11:55:26 rgb
|
||||
* Added extern sadb_satype2proto to enable moving protocol lookup table
|
||||
* to lib/pfkey_v2_parse.c.
|
||||
* Delete unused, moved typedefs.
|
||||
* Add argument to pfkey_msg_parse() for direction.
|
||||
* Consolidated the 4 1-d extension bitmap arrays into one 4-d array.
|
||||
*
|
||||
* Revision 1.10 1999/11/23 22:29:21 rgb
|
||||
* This file has been moved in the distribution from klips/net/ipsec to
|
||||
* lib.
|
||||
* Add macros for dealing with alignment and rounding up more opaquely.
|
||||
* The uint<n>_t type defines have been moved to freeswan.h to avoid
|
||||
* chicken-and-egg problems.
|
||||
* Add macros for dealing with alignment and rounding up more opaque.
|
||||
* Added prototypes for using extention header bitmaps.
|
||||
* Added prototypes of all the build functions.
|
||||
*
|
||||
* Revision 1.9 1999/11/20 21:59:48 rgb
|
||||
* Moved socketlist type declarations and prototypes for shared use.
|
||||
* Slightly modified scope of sockaddr_key declaration.
|
||||
*
|
||||
* Revision 1.8 1999/11/17 14:34:25 rgb
|
||||
* Protect sa_family_t from being used in userspace with GLIBC<2.
|
||||
*
|
||||
* Revision 1.7 1999/10/27 19:40:35 rgb
|
||||
* Add a maximum PFKEY packet size macro.
|
||||
*
|
||||
* Revision 1.6 1999/10/26 16:58:58 rgb
|
||||
* Created a sockaddr_key and key_opt socket extension structures.
|
||||
*
|
||||
* Revision 1.5 1999/06/10 05:24:41 rgb
|
||||
* Renamed variables to reduce confusion.
|
||||
*
|
||||
* Revision 1.4 1999/04/29 15:21:11 rgb
|
||||
* Add pfkey support to debugging.
|
||||
* Add return values to init and cleanup functions.
|
||||
*
|
||||
* Revision 1.3 1999/04/15 17:58:07 rgb
|
||||
* Add RCSID labels.
|
||||
*
|
||||
*/
|
|
@ -87,7 +87,7 @@ void (*pfkey_debug_func)(const char *message, ...) PRINTF_LIKE(1);
|
|||
KLIPS_PRINT(debug_pfkey, "klips_debug:" args)
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#include "freeswan/ipsec_sa.h" /* IPSEC_SAREF_NULL, IPSEC_SA_REF_TABLE_IDX_WIDTH */
|
||||
#include "ipsec_sa.h" /* IPSEC_SAREF_NULL, IPSEC_SA_REF_TABLE_IDX_WIDTH */
|
||||
|
||||
#define SENDERR(_x) do { error = -(_x); goto errlab; } while (0)
|
||||
|
||||
|
|
|
@ -49,9 +49,9 @@ char pfkey_v2_parse_c_version[] = "$Id: pfkey_v2_parse.c,v 1.4 2004/06/13 20:35:
|
|||
# endif /* if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
|
||||
extern int debug_pfkey;
|
||||
|
||||
# include <freeswan.h>
|
||||
# include freeswan.h"
|
||||
|
||||
#include "freeswan/ipsec_encap.h"
|
||||
#include "ipsec_encap.h"
|
||||
|
||||
#else /* __KERNEL__ */
|
||||
|
||||
|
@ -60,9 +60,9 @@ extern int debug_pfkey;
|
|||
# include <linux/errno.h>
|
||||
|
||||
# include <freeswan.h>
|
||||
# include "src/pluto/constants.h"
|
||||
# include "src/pluto/defs.h" /* for PRINTF_LIKE */
|
||||
# include "src/pluto/log.h" /* for debugging and DBG_log */
|
||||
# include <constants.h>
|
||||
# include <defs.h> /* for PRINTF_LIKE */
|
||||
# include <log.h> /* for debugging and DBG_log */
|
||||
|
||||
/* #define PLUTO */
|
||||
|
||||
|
@ -86,7 +86,7 @@ extern int sysctl_ipsec_debug_verbose;
|
|||
|| (sysctl_ipsec_debug_verbose && (debug_pfkey & level & PF_KEY_DEBUG_PARSE_FLOW))) \
|
||||
, "klips_debug:" args)
|
||||
#endif /* __KERNEL__ */
|
||||
#include "freeswan/ipsec_sa.h" /* IPSEC_SAREF_NULL, IPSEC_SA_REF_TABLE_IDX_WIDTH */
|
||||
#include "ipsec_sa.h" /* IPSEC_SAREF_NULL, IPSEC_SA_REF_TABLE_IDX_WIDTH */
|
||||
|
||||
|
||||
#define SENDERR(_x) do { error = -(_x); goto errlab; } while (0)
|
||||
|
|
|
@ -0,0 +1,385 @@
|
|||
/*
|
||||
* RCSID $Id: pfkeyv2.h,v 1.5 2004/10/04 22:43:56 as Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
RFC 2367 PF_KEY Key Management API July 1998
|
||||
|
||||
|
||||
Appendix D: Sample Header File
|
||||
|
||||
This file defines structures and symbols for the PF_KEY Version 2
|
||||
key management interface. It was written at the U.S. Naval Research
|
||||
Laboratory. This file is in the public domain. The authors ask that
|
||||
you leave this credit intact on any copies of this file.
|
||||
*/
|
||||
#ifndef __PFKEY_V2_H
|
||||
#define __PFKEY_V2_H 1
|
||||
|
||||
#define PF_KEY_V2 2
|
||||
#define PFKEYV2_REVISION 199806L
|
||||
|
||||
#define SADB_RESERVED 0
|
||||
#define SADB_GETSPI 1
|
||||
#define SADB_UPDATE 2
|
||||
#define SADB_ADD 3
|
||||
#define SADB_DELETE 4
|
||||
#define SADB_GET 5
|
||||
#define SADB_ACQUIRE 6
|
||||
#define SADB_REGISTER 7
|
||||
#define SADB_EXPIRE 8
|
||||
#define SADB_FLUSH 9
|
||||
#define SADB_DUMP 10
|
||||
#define SADB_X_PROMISC 11
|
||||
#define SADB_X_PCHANGE 12
|
||||
#define SADB_X_GRPSA 13
|
||||
#define SADB_X_ADDFLOW 14
|
||||
#define SADB_X_DELFLOW 15
|
||||
#define SADB_X_DEBUG 16
|
||||
#ifdef NAT_TRAVERSAL
|
||||
#define SADB_X_NAT_T_NEW_MAPPING 17
|
||||
#define SADB_MAX 17
|
||||
#else
|
||||
#define SADB_MAX 16
|
||||
#endif
|
||||
|
||||
struct sadb_msg {
|
||||
uint8_t sadb_msg_version;
|
||||
uint8_t sadb_msg_type;
|
||||
uint8_t sadb_msg_errno;
|
||||
uint8_t sadb_msg_satype;
|
||||
uint16_t sadb_msg_len;
|
||||
uint16_t sadb_msg_reserved;
|
||||
uint32_t sadb_msg_seq;
|
||||
uint32_t sadb_msg_pid;
|
||||
};
|
||||
|
||||
struct sadb_ext {
|
||||
uint16_t sadb_ext_len;
|
||||
uint16_t sadb_ext_type;
|
||||
};
|
||||
|
||||
struct sadb_sa {
|
||||
uint16_t sadb_sa_len;
|
||||
uint16_t sadb_sa_exttype;
|
||||
uint32_t sadb_sa_spi;
|
||||
uint8_t sadb_sa_replay;
|
||||
uint8_t sadb_sa_state;
|
||||
uint8_t sadb_sa_auth;
|
||||
uint8_t sadb_sa_encrypt;
|
||||
uint32_t sadb_sa_flags;
|
||||
uint32_t /*IPsecSAref_t*/ sadb_x_sa_ref; /* 32 bits */
|
||||
uint8_t sadb_x_reserved[4];
|
||||
};
|
||||
|
||||
struct sadb_sa_v1 {
|
||||
uint16_t sadb_sa_len;
|
||||
uint16_t sadb_sa_exttype;
|
||||
uint32_t sadb_sa_spi;
|
||||
uint8_t sadb_sa_replay;
|
||||
uint8_t sadb_sa_state;
|
||||
uint8_t sadb_sa_auth;
|
||||
uint8_t sadb_sa_encrypt;
|
||||
uint32_t sadb_sa_flags;
|
||||
};
|
||||
|
||||
struct sadb_lifetime {
|
||||
uint16_t sadb_lifetime_len;
|
||||
uint16_t sadb_lifetime_exttype;
|
||||
uint32_t sadb_lifetime_allocations;
|
||||
uint64_t sadb_lifetime_bytes;
|
||||
uint64_t sadb_lifetime_addtime;
|
||||
uint64_t sadb_lifetime_usetime;
|
||||
uint32_t sadb_x_lifetime_packets;
|
||||
uint32_t sadb_x_lifetime_reserved;
|
||||
};
|
||||
|
||||
struct sadb_address {
|
||||
uint16_t sadb_address_len;
|
||||
uint16_t sadb_address_exttype;
|
||||
uint8_t sadb_address_proto;
|
||||
uint8_t sadb_address_prefixlen;
|
||||
uint16_t sadb_address_reserved;
|
||||
};
|
||||
|
||||
struct sadb_key {
|
||||
uint16_t sadb_key_len;
|
||||
uint16_t sadb_key_exttype;
|
||||
uint16_t sadb_key_bits;
|
||||
uint16_t sadb_key_reserved;
|
||||
};
|
||||
|
||||
struct sadb_ident {
|
||||
uint16_t sadb_ident_len;
|
||||
uint16_t sadb_ident_exttype;
|
||||
uint16_t sadb_ident_type;
|
||||
uint16_t sadb_ident_reserved;
|
||||
uint64_t sadb_ident_id;
|
||||
};
|
||||
|
||||
struct sadb_sens {
|
||||
uint16_t sadb_sens_len;
|
||||
uint16_t sadb_sens_exttype;
|
||||
uint32_t sadb_sens_dpd;
|
||||
uint8_t sadb_sens_sens_level;
|
||||
uint8_t sadb_sens_sens_len;
|
||||
uint8_t sadb_sens_integ_level;
|
||||
uint8_t sadb_sens_integ_len;
|
||||
uint32_t sadb_sens_reserved;
|
||||
};
|
||||
|
||||
struct sadb_prop {
|
||||
uint16_t sadb_prop_len;
|
||||
uint16_t sadb_prop_exttype;
|
||||
uint8_t sadb_prop_replay;
|
||||
uint8_t sadb_prop_reserved[3];
|
||||
};
|
||||
|
||||
struct sadb_comb {
|
||||
uint8_t sadb_comb_auth;
|
||||
uint8_t sadb_comb_encrypt;
|
||||
uint16_t sadb_comb_flags;
|
||||
uint16_t sadb_comb_auth_minbits;
|
||||
uint16_t sadb_comb_auth_maxbits;
|
||||
uint16_t sadb_comb_encrypt_minbits;
|
||||
uint16_t sadb_comb_encrypt_maxbits;
|
||||
uint32_t sadb_comb_reserved;
|
||||
uint32_t sadb_comb_soft_allocations;
|
||||
uint32_t sadb_comb_hard_allocations;
|
||||
uint64_t sadb_comb_soft_bytes;
|
||||
uint64_t sadb_comb_hard_bytes;
|
||||
uint64_t sadb_comb_soft_addtime;
|
||||
uint64_t sadb_comb_hard_addtime;
|
||||
uint64_t sadb_comb_soft_usetime;
|
||||
uint64_t sadb_comb_hard_usetime;
|
||||
uint32_t sadb_x_comb_soft_packets;
|
||||
uint32_t sadb_x_comb_hard_packets;
|
||||
};
|
||||
|
||||
struct sadb_supported {
|
||||
uint16_t sadb_supported_len;
|
||||
uint16_t sadb_supported_exttype;
|
||||
uint32_t sadb_supported_reserved;
|
||||
};
|
||||
|
||||
struct sadb_alg {
|
||||
uint8_t sadb_alg_id;
|
||||
uint8_t sadb_alg_ivlen;
|
||||
uint16_t sadb_alg_minbits;
|
||||
uint16_t sadb_alg_maxbits;
|
||||
uint16_t sadb_alg_reserved;
|
||||
};
|
||||
|
||||
struct sadb_spirange {
|
||||
uint16_t sadb_spirange_len;
|
||||
uint16_t sadb_spirange_exttype;
|
||||
uint32_t sadb_spirange_min;
|
||||
uint32_t sadb_spirange_max;
|
||||
uint32_t sadb_spirange_reserved;
|
||||
};
|
||||
|
||||
struct sadb_x_kmprivate {
|
||||
uint16_t sadb_x_kmprivate_len;
|
||||
uint16_t sadb_x_kmprivate_exttype;
|
||||
uint32_t sadb_x_kmprivate_reserved;
|
||||
};
|
||||
|
||||
struct sadb_x_satype {
|
||||
uint16_t sadb_x_satype_len;
|
||||
uint16_t sadb_x_satype_exttype;
|
||||
uint8_t sadb_x_satype_satype;
|
||||
uint8_t sadb_x_satype_reserved[3];
|
||||
};
|
||||
|
||||
struct sadb_x_policy {
|
||||
uint16_t sadb_x_policy_len;
|
||||
uint16_t sadb_x_policy_exttype;
|
||||
uint16_t sadb_x_policy_type;
|
||||
uint8_t sadb_x_policy_dir;
|
||||
uint8_t sadb_x_policy_reserved;
|
||||
uint32_t sadb_x_policy_id;
|
||||
uint32_t sadb_x_policy_reserved2;
|
||||
};
|
||||
|
||||
struct sadb_x_debug {
|
||||
uint16_t sadb_x_debug_len;
|
||||
uint16_t sadb_x_debug_exttype;
|
||||
uint32_t sadb_x_debug_tunnel;
|
||||
uint32_t sadb_x_debug_netlink;
|
||||
uint32_t sadb_x_debug_xform;
|
||||
uint32_t sadb_x_debug_eroute;
|
||||
uint32_t sadb_x_debug_spi;
|
||||
uint32_t sadb_x_debug_radij;
|
||||
uint32_t sadb_x_debug_esp;
|
||||
uint32_t sadb_x_debug_ah;
|
||||
uint32_t sadb_x_debug_rcv;
|
||||
uint32_t sadb_x_debug_pfkey;
|
||||
uint32_t sadb_x_debug_ipcomp;
|
||||
uint32_t sadb_x_debug_verbose;
|
||||
uint8_t sadb_x_debug_reserved[4];
|
||||
};
|
||||
|
||||
#ifdef NAT_TRAVERSAL
|
||||
struct sadb_x_nat_t_type {
|
||||
uint16_t sadb_x_nat_t_type_len;
|
||||
uint16_t sadb_x_nat_t_type_exttype;
|
||||
uint8_t sadb_x_nat_t_type_type;
|
||||
uint8_t sadb_x_nat_t_type_reserved[3];
|
||||
};
|
||||
struct sadb_x_nat_t_port {
|
||||
uint16_t sadb_x_nat_t_port_len;
|
||||
uint16_t sadb_x_nat_t_port_exttype;
|
||||
uint16_t sadb_x_nat_t_port_port;
|
||||
uint16_t sadb_x_nat_t_port_reserved;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A protocol structure for passing through the transport level
|
||||
* protocol. It contains more fields than are actually used/needed
|
||||
* but it is this way to be compatible with the structure used in
|
||||
* OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/sys/net/pfkeyv2.h)
|
||||
*/
|
||||
struct sadb_protocol {
|
||||
uint16_t sadb_protocol_len;
|
||||
uint16_t sadb_protocol_exttype;
|
||||
uint8_t sadb_protocol_proto;
|
||||
uint8_t sadb_protocol_direction;
|
||||
uint8_t sadb_protocol_flags;
|
||||
uint8_t sadb_protocol_reserved2;
|
||||
};
|
||||
|
||||
#define SADB_EXT_RESERVED 0
|
||||
#define SADB_EXT_SA 1
|
||||
#define SADB_EXT_LIFETIME_CURRENT 2
|
||||
#define SADB_EXT_LIFETIME_HARD 3
|
||||
#define SADB_EXT_LIFETIME_SOFT 4
|
||||
#define SADB_EXT_ADDRESS_SRC 5
|
||||
#define SADB_EXT_ADDRESS_DST 6
|
||||
#define SADB_EXT_ADDRESS_PROXY 7
|
||||
#define SADB_EXT_KEY_AUTH 8
|
||||
#define SADB_EXT_KEY_ENCRYPT 9
|
||||
#define SADB_EXT_IDENTITY_SRC 10
|
||||
#define SADB_EXT_IDENTITY_DST 11
|
||||
#define SADB_EXT_SENSITIVITY 12
|
||||
#define SADB_EXT_PROPOSAL 13
|
||||
#define SADB_EXT_SUPPORTED_AUTH 14
|
||||
#define SADB_EXT_SUPPORTED_ENCRYPT 15
|
||||
#define SADB_EXT_SPIRANGE 16
|
||||
#define SADB_X_EXT_KMPRIVATE 17
|
||||
#define SADB_X_EXT_SATYPE2 18
|
||||
#ifdef KERNEL26_HAS_KAME_DUPLICATES
|
||||
#define SADB_X_EXT_POLICY 18
|
||||
#endif
|
||||
#define SADB_X_EXT_SA2 19
|
||||
#define SADB_X_EXT_ADDRESS_DST2 20
|
||||
#define SADB_X_EXT_ADDRESS_SRC_FLOW 21
|
||||
#define SADB_X_EXT_ADDRESS_DST_FLOW 22
|
||||
#define SADB_X_EXT_ADDRESS_SRC_MASK 23
|
||||
#define SADB_X_EXT_ADDRESS_DST_MASK 24
|
||||
#define SADB_X_EXT_DEBUG 25
|
||||
#define SADB_X_EXT_PROTOCOL 26
|
||||
#ifdef NAT_TRAVERSAL
|
||||
#define SADB_X_EXT_NAT_T_TYPE 27
|
||||
#define SADB_X_EXT_NAT_T_SPORT 28
|
||||
#define SADB_X_EXT_NAT_T_DPORT 29
|
||||
#define SADB_X_EXT_NAT_T_OA 30
|
||||
#define SADB_EXT_MAX 30
|
||||
#else
|
||||
#define SADB_EXT_MAX 26
|
||||
#endif
|
||||
|
||||
/* SADB_X_DELFLOW required over and above SADB_X_SAFLAGS_CLEARFLOW */
|
||||
#define SADB_X_EXT_ADDRESS_DELFLOW \
|
||||
( (1<<SADB_X_EXT_ADDRESS_SRC_FLOW) \
|
||||
| (1<<SADB_X_EXT_ADDRESS_DST_FLOW) \
|
||||
| (1<<SADB_X_EXT_ADDRESS_SRC_MASK) \
|
||||
| (1<<SADB_X_EXT_ADDRESS_DST_MASK))
|
||||
|
||||
#define SADB_SATYPE_UNSPEC 0
|
||||
#define SADB_SATYPE_AH 2
|
||||
#define SADB_SATYPE_ESP 3
|
||||
#define SADB_SATYPE_RSVP 5
|
||||
#define SADB_SATYPE_OSPFV2 6
|
||||
#define SADB_SATYPE_RIPV2 7
|
||||
#define SADB_SATYPE_MIP 8
|
||||
#define SADB_X_SATYPE_IPIP 9
|
||||
#ifdef KERNEL26_HAS_KAME_DUPLICATES
|
||||
#define SADB_X_SATYPE_IPCOMP 9 /* ICK! */
|
||||
#endif
|
||||
#define SADB_X_SATYPE_COMP 10
|
||||
#define SADB_X_SATYPE_INT 11
|
||||
#define SADB_SATYPE_MAX 11
|
||||
|
||||
#define SADB_SASTATE_LARVAL 0
|
||||
#define SADB_SASTATE_MATURE 1
|
||||
#define SADB_SASTATE_DYING 2
|
||||
#define SADB_SASTATE_DEAD 3
|
||||
#define SADB_SASTATE_MAX 3
|
||||
|
||||
#define SADB_SAFLAGS_PFS 1
|
||||
#define SADB_X_SAFLAGS_REPLACEFLOW 2
|
||||
#define SADB_X_SAFLAGS_CLEARFLOW 4
|
||||
#define SADB_X_SAFLAGS_INFLOW 8
|
||||
|
||||
/* not obvious, but these are the same values as used in isakmp,
|
||||
* and in freeswan/ipsec_policy.h. If you need to add any, they
|
||||
* should be added as according to
|
||||
* http://www.iana.org/assignments/isakmp-registry
|
||||
*
|
||||
* and if not, then please try to use a private-use value, and
|
||||
* consider asking IANA to assign a value.
|
||||
*/
|
||||
#define SADB_AALG_NONE 0
|
||||
#define SADB_AALG_MD5_HMAC 2
|
||||
#define SADB_AALG_SHA1_HMAC 3
|
||||
#define SADB_AALG_DES_MAC 4
|
||||
#define SADB_AALG_SHA2_256_HMAC 5
|
||||
#define SADB_AALG_SHA2_384_HMAC 6
|
||||
#define SADB_AALG_SHA2_512_HMAC 7
|
||||
#define SADB_AALG_RIPEMD_160_HMAC 8
|
||||
#define SADB_AALG_AES_XCBC_MAC 9
|
||||
#define SADB_X_AALG_NULL 251 /* kame */
|
||||
#define SADB_AALG_MAX 251
|
||||
|
||||
#define SADB_EALG_NONE 0
|
||||
#define SADB_EALG_DES_CBC 2
|
||||
#define SADB_EALG_3DES_CBC 3
|
||||
#define SADB_EALG_RC5_CBC 4
|
||||
#define SADB_EALG_IDEA_CBC 5
|
||||
#define SADB_EALG_CAST_CBC 6
|
||||
#define SADB_EALG_BLOWFISH_CBC 7
|
||||
#define SADB_EALG_NULL 11
|
||||
#define SADB_EALG_AES_CBC 12
|
||||
#define SADB_EALG_AES_CTR 13
|
||||
#define SADB_X_EALG_SERPENT_CBC 252
|
||||
#define SADB_X_EALG_TWOFISH_CBC 253
|
||||
#define SADB_EALG_MAX 253
|
||||
|
||||
#define SADB_X_CALG_NONE 0
|
||||
#define SADB_X_CALG_OUI 1
|
||||
#define SADB_X_CALG_DEFLATE 2
|
||||
#define SADB_X_CALG_LZS 3
|
||||
#define SADB_X_CALG_V42BIS 4
|
||||
#ifdef KERNEL26_HAS_KAME_DUPLICATES
|
||||
#define SADB_X_CALG_LZJH 4
|
||||
#endif
|
||||
#define SADB_X_CALG_MAX 4
|
||||
|
||||
#define SADB_X_TALG_NONE 0
|
||||
#define SADB_X_TALG_IPv4_in_IPv4 1
|
||||
#define SADB_X_TALG_IPv6_in_IPv4 2
|
||||
#define SADB_X_TALG_IPv4_in_IPv6 3
|
||||
#define SADB_X_TALG_IPv6_in_IPv6 4
|
||||
#define SADB_X_TALG_MAX 4
|
||||
|
||||
|
||||
#define SADB_IDENTTYPE_RESERVED 0
|
||||
#define SADB_IDENTTYPE_PREFIX 1
|
||||
#define SADB_IDENTTYPE_FQDN 2
|
||||
#define SADB_IDENTTYPE_USERFQDN 3
|
||||
#define SADB_X_IDENTTYPE_CONNECTION 4
|
||||
#define SADB_IDENTTYPE_MAX 4
|
||||
|
||||
#define SADB_KEY_FLAGS_MAX 0
|
||||
#endif /* __PFKEY_V2_H */
|
|
@ -21,9 +21,8 @@
|
|||
|
||||
#include "freeswan.h"
|
||||
|
||||
#define V "xxx" /* substituted in by Makefile */
|
||||
static const char strongswan_number[] = V;
|
||||
static const char strongswan_string[] = "Linux strongSwan " V;
|
||||
static const char strongswan_number[] = VERSION;
|
||||
static const char strongswan_string[] = "Linux strongSwan " VERSION;
|
||||
|
||||
/*
|
||||
- ipsec_version_code - return IPsec version number/code, as string
|
|
@ -0,0 +1,71 @@
|
|||
lib_LTLIBRARIES = libstrongswan.la
|
||||
|
||||
libstrongswan_la_SOURCES = \
|
||||
crypto/rsa/rsa_private_key.c \
|
||||
crypto/rsa/rsa_public_key.h \
|
||||
crypto/rsa/rsa_private_key.h \
|
||||
crypto/rsa/rsa_public_key.c \
|
||||
crypto/prfs/hmac_prf.c \
|
||||
crypto/prfs/hmac_prf.h \
|
||||
crypto/prfs/prf.c \
|
||||
crypto/prfs/prf.h \
|
||||
crypto/signers/hmac_signer.c \
|
||||
crypto/signers/hmac_signer.h \
|
||||
crypto/signers/signer.c \
|
||||
crypto/signers/signer.h \
|
||||
crypto/crypters/aes_cbc_crypter.c \
|
||||
crypto/crypters/crypter.c \
|
||||
crypto/crypters/aes_cbc_crypter.h \
|
||||
crypto/crypters/crypter.h \
|
||||
crypto/hashers/sha1_hasher.c \
|
||||
crypto/hashers/md5_hasher.c \
|
||||
crypto/hashers/hasher.h \
|
||||
crypto/hashers/md5_hasher.h \
|
||||
crypto/hashers/hasher.c \
|
||||
crypto/hashers/sha1_hasher.h \
|
||||
crypto/diffie_hellman.c \
|
||||
crypto/prf_plus.h \
|
||||
crypto/x509.c \
|
||||
crypto/prf_plus.c \
|
||||
crypto/hmac.c \
|
||||
crypto/x509.h \
|
||||
crypto/hmac.h \
|
||||
crypto/diffie_hellman.h \
|
||||
utils/identification.h \
|
||||
utils/iterator.h \
|
||||
utils/linked_list.c \
|
||||
utils/linked_list.h \
|
||||
utils/tester.c \
|
||||
utils/leak_detective.c \
|
||||
utils/logger_manager.c \
|
||||
utils/randomizer.c \
|
||||
utils/tester.h \
|
||||
utils/leak_detective.h \
|
||||
utils/host.c \
|
||||
utils/logger_manager.h \
|
||||
utils/randomizer.h \
|
||||
utils/logger.c \
|
||||
utils/host.h \
|
||||
utils/logger.h \
|
||||
utils/identification.c \
|
||||
utils/lexparser.c \
|
||||
utils/lexparser.h \
|
||||
asn1/ttodata.c \
|
||||
asn1/oid.h \
|
||||
asn1/ttodata.h \
|
||||
asn1/pem.c \
|
||||
asn1/asn1.c \
|
||||
asn1/pem.h \
|
||||
asn1/asn1.h \
|
||||
asn1/oid.c \
|
||||
definitions.h \
|
||||
types.h \
|
||||
definitions.c \
|
||||
library.c \
|
||||
types.c \
|
||||
library.h
|
||||
|
||||
LDADD = -lgmp -lpthread
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libstrongswan
|
||||
EXTRA_DIST = asn1/oid.txt asn1/oid.pl
|
|
@ -1,154 +0,0 @@
|
|||
# Makefile for the openac attribute certificate generation tool
|
||||
# Copyright (C) 2004 Andreas Steffen
|
||||
# Zuercher Hochschule Winterthur
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# RCSID $Id: Makefile,v 1.16 2006/02/17 19:33:27 as Exp $
|
||||
|
||||
FREESWANSRCDIR=../..
|
||||
include ${FREESWANSRCDIR}/Makefile.inc
|
||||
|
||||
CONFDIR=$(DESTDIR)/etc/openac
|
||||
PLUTODIR=../pluto
|
||||
|
||||
PROGRAM=openac
|
||||
EXTRA8PROC=${PROGRAM}.8
|
||||
|
||||
LIBS=${FREESWANLIB} $(LIBDESLITE) -lgmp
|
||||
CFLAGS+= -DDEBUG -DNO_PLUTO
|
||||
|
||||
# This compile option activates the leak detective
|
||||
ifeq ($(USE_LEAK_DETECTIVE),true)
|
||||
CFLAGS+= -DLEAK_DETECTIVE
|
||||
endif
|
||||
|
||||
X509_OBJS= ac.o asn1.o ca.o certs.o constants.o crl.o defs.o mp_defs.o fetch.o \
|
||||
id.o keys.o lex.o md2.o md5.o ocsp.o oid.o pem.o pgp.o pkcs1.o \
|
||||
rnd.o sha1.o smartcard.o x509.o
|
||||
|
||||
OBJS= build.o loglite.o ${X509_OBJS}
|
||||
|
||||
include ../Makefile.program
|
||||
|
||||
build.o : build.c build.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
loglite.o : loglite.c $(PLUTODIR)/log.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
# X.509 library
|
||||
|
||||
ac.o : $(PLUTODIR)/ac.c $(PLUTODIR)/ac.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
asn1.o : $(PLUTODIR)/asn1.c $(PLUTODIR)/asn1.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
ca.o : $(PLUTODIR)/ca.c $(PLUTODIR)/ca.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
certs.o : $(PLUTODIR)/certs.c $(PLUTODIR)/certs.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
constants.o : $(PLUTODIR)/constants.c $(PLUTODIR)/constants.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
crl.o : $(PLUTODIR)/crl.c $(PLUTODIR)/crl.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
defs.o : $(PLUTODIR)/defs.c $(PLUTODIR)/defs.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
mp_defs.o : $(PLUTODIR)/mp_defs.c $(PLUTODIR)/mp_defs.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
fetch.o : $(PLUTODIR)/fetch.c $(PLUTODIR)/fetch.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
id.o : $(PLUTODIR)/id.c $(PLUTODIR)/id.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
keys.o : $(PLUTODIR)/keys.c $(PLUTODIR)/keys.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
lex.o : $(PLUTODIR)/lex.c $(PLUTODIR)/lex.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
md2.o : $(PLUTODIR)/md2.c $(PLUTODIR)/md2.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
md5.o : $(PLUTODIR)/md5.c $(PLUTODIR)/md5.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
ocsp.o : $(PLUTODIR)/ocsp.c $(PLUTODIR)/ocsp.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
oid.o : $(PLUTODIR)/oid.c $(PLUTODIR)/oid.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
pem.o : $(PLUTODIR)/pem.c $(PLUTODIR)/pem.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
pgp.o : $(PLUTODIR)/pgp.c $(PLUTODIR)/pgp.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
pkcs1.o : $(PLUTODIR)/pkcs1.c $(PLUTODIR)/pkcs1.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
rnd.o : $(PLUTODIR)/rnd.c $(PLUTODIR)/rnd.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
sha1.o : $(PLUTODIR)/sha1.c $(PLUTODIR)/sha1.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
smartcard.o : $(PLUTODIR)/smartcard.c $(PLUTODIR)/smartcard.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
x509.o : $(PLUTODIR)/x509.c $(PLUTODIR)/x509.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
# Stolen from pluto/Makefile
|
||||
|
||||
gatherdeps:
|
||||
@ls | grep '\.c$$' | sed -e 's/\(.*\)\.c$$/\1.o: \1.c/'
|
||||
@echo
|
||||
@ls | grep '\.c$$' | xargs grep '^#[ ]*include[ ]*"' | \
|
||||
sed -e 's/\.c:#[ ]*include[ ]*"/.o: /' -e 's/".*//'
|
||||
|
||||
# Dependencies generated by "make gatherdeps":
|
||||
|
||||
build.o: build.c
|
||||
loglite.o: loglite.c
|
||||
openac.o: openac.c
|
||||
|
||||
build.o: ../pluto/constants.h
|
||||
build.o: ../pluto/defs.h
|
||||
build.o: ../pluto/oid.h
|
||||
build.o: ../pluto/asn1.h
|
||||
build.o: ../pluto/x509.h
|
||||
build.o: ../pluto/log.h
|
||||
build.o: build.h
|
||||
loglite.o: ../pluto/constants.h
|
||||
loglite.o: ../pluto/defs.h
|
||||
loglite.o: ../pluto/log.h
|
||||
loglite.o: ../pluto/whack.h
|
||||
openac.o: ../pluto/constants.h
|
||||
openac.o: ../pluto/defs.h
|
||||
openac.o: ../pluto/mp_defs.h
|
||||
openac.o: ../pluto/log.h
|
||||
openac.o: ../pluto/asn1.h
|
||||
openac.o: ../pluto/certs.h
|
||||
openac.o: ../pluto/x509.h
|
||||
openac.o: ../pluto/crl.h
|
||||
openac.o: ../pluto/keys.h
|
||||
openac.o: ../pluto/ac.h
|
||||
openac.o: build.h
|
|
@ -0,0 +1,83 @@
|
|||
ipsec_PROGRAMS = openac
|
||||
openac_SOURCES = openac.c build.c build.h loglite.c
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libfreeswan -I$(top_srcdir)/src/pluto -I$(top_srcdir)/src/libcrypto -I$(top_srcdir)/src/whack
|
||||
AM_CFLAGS = -DDEBUG -DNO_PLUTO -DIPSEC_CONFDIR=\"${confdir}\"
|
||||
openac_LDADD = ac.o asn1.o ca.o certs.o constants.o crl.o defs.o mp_defs.o fetch.o id.o keys.o lex.o \
|
||||
md2.o md5.o ocsp.o oid.o pem.o pgp.o pkcs1.o rnd.o sha1.o smartcard.o x509.o \
|
||||
$(top_srcdir)/src/libfreeswan/libfreeswan.a $(top_srcdir)/src/libcrypto/libcrypto.a \
|
||||
-lgmp
|
||||
|
||||
dist_man_MANS = openac.8
|
||||
|
||||
PLUTODIR=$(top_srcdir)/src/pluto
|
||||
|
||||
ac.o : $(PLUTODIR)/ac.c $(PLUTODIR)/ac.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
asn1.o : $(PLUTODIR)/asn1.c $(PLUTODIR)/asn1.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
ca.o : $(PLUTODIR)/ca.c $(PLUTODIR)/ca.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
certs.o : $(PLUTODIR)/certs.c $(PLUTODIR)/certs.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
constants.o : $(PLUTODIR)/constants.c $(PLUTODIR)/constants.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
crl.o : $(PLUTODIR)/crl.c $(PLUTODIR)/crl.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
defs.o : $(PLUTODIR)/defs.c $(PLUTODIR)/defs.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
mp_defs.o : $(PLUTODIR)/mp_defs.c $(PLUTODIR)/mp_defs.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
fetch.o : $(PLUTODIR)/fetch.c $(PLUTODIR)/fetch.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
id.o : $(PLUTODIR)/id.c $(PLUTODIR)/id.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
keys.o : $(PLUTODIR)/keys.c $(PLUTODIR)/keys.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
lex.o : $(PLUTODIR)/lex.c $(PLUTODIR)/lex.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
md2.o : $(PLUTODIR)/md2.c $(PLUTODIR)/md2.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
md5.o : $(PLUTODIR)/md5.c $(PLUTODIR)/md5.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
ocsp.o : $(PLUTODIR)/ocsp.c $(PLUTODIR)/ocsp.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
oid.o : $(PLUTODIR)/oid.c $(PLUTODIR)/oid.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
pem.o : $(PLUTODIR)/pem.c $(PLUTODIR)/pem.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
pgp.o : $(PLUTODIR)/pgp.c $(PLUTODIR)/pgp.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
pkcs1.o : $(PLUTODIR)/pkcs1.c $(PLUTODIR)/pkcs1.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
rnd.o : $(PLUTODIR)/rnd.c $(PLUTODIR)/rnd.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
sha1.o : $(PLUTODIR)/sha1.c $(PLUTODIR)/sha1.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
smartcard.o : $(PLUTODIR)/smartcard.c $(PLUTODIR)/smartcard.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
x509.o : $(PLUTODIR)/x509.c $(PLUTODIR)/x509.h
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
|
@ -30,10 +30,10 @@
|
|||
|
||||
#include <freeswan.h>
|
||||
|
||||
#include "../pluto/constants.h"
|
||||
#include "../pluto/defs.h"
|
||||
#include "../pluto/log.h"
|
||||
#include "../pluto/whack.h"
|
||||
#include <constants.h>
|
||||
#include <defs.h>
|
||||
#include <log.h>
|
||||
#include <whack.h>
|
||||
|
||||
bool
|
||||
log_to_stderr = FALSE, /* should log go to stderr? */
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
|
||||
#include "build.h"
|
||||
|
||||
#define OPENAC_PATH "/etc/openac"
|
||||
#define OPENAC_SERIAL "/etc/openac/serial"
|
||||
#define OPENAC_PATH IPSEC_CONFDIR "/openac"
|
||||
#define OPENAC_SERIAL IPSEC_CONFDIR "/openac/serial"
|
||||
|
||||
const char openac_version[] = "openac 0.3";
|
||||
|
||||
|
|
1095
src/pluto/Makefile
1095
src/pluto/Makefile
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,178 @@
|
|||
# Makefile.am was ported from the old Makefile the most
|
||||
# painless way. Only the most important options are included,
|
||||
# further work may be necessary here...
|
||||
|
||||
ipsec_PROGRAMS = pluto _pluto_adns
|
||||
|
||||
pluto_SOURCES = \
|
||||
linux26/rtnetlink.h \
|
||||
linux26/xfrm.h \
|
||||
linux26/netlink.h \
|
||||
rsaref/pkcs11t.h \
|
||||
rsaref/pkcs11.h \
|
||||
rsaref/unix.h \
|
||||
rsaref/pkcs11f.h \
|
||||
alg/ike_alg_twofish.c \
|
||||
alg/ike_alg_aes.c \
|
||||
alg/ike_alg_blowfish.c \
|
||||
alg/ike_alg_sha2.c \
|
||||
alg/ike_alg_serpent.c \
|
||||
alg/ike_alginit.c \
|
||||
kernel_alg.c \
|
||||
kernel_alg.h \
|
||||
kernel_pfkey.h \
|
||||
kernel_pfkey.c \
|
||||
gcryptfix.c \
|
||||
gcryptfix.h \
|
||||
primegen.c \
|
||||
smallprime.c \
|
||||
ocsp.c \
|
||||
ocsp.h \
|
||||
pgp.c \
|
||||
ac.c \
|
||||
certs.c \
|
||||
connections.c \
|
||||
certs.h \
|
||||
virtual.c \
|
||||
connections.h \
|
||||
fetch.c \
|
||||
virtual.h \
|
||||
fetch.h \
|
||||
ipsec_doi.c \
|
||||
ipsec_doi.h \
|
||||
x509.c \
|
||||
kameipsec.h \
|
||||
cookie.c \
|
||||
x509.h \
|
||||
cookie.h \
|
||||
pgp.h \
|
||||
ac.h \
|
||||
sha1.c \
|
||||
sha1.h \
|
||||
constants.c \
|
||||
smartcard.c \
|
||||
kernel.c \
|
||||
constants.h \
|
||||
smartcard.h \
|
||||
kernel.h \
|
||||
dnskey.c \
|
||||
asn1.c \
|
||||
dnskey.h \
|
||||
elgamal.c \
|
||||
db_ops.c \
|
||||
asn1.h \
|
||||
elgamal.h \
|
||||
oid.c \
|
||||
db_ops.h \
|
||||
mp_defs.c \
|
||||
state.c \
|
||||
oid.h \
|
||||
mp_defs.h \
|
||||
ca.c \
|
||||
state.h \
|
||||
pkcs7.c \
|
||||
lex.c \
|
||||
ca.h \
|
||||
pkcs7.h \
|
||||
id.c \
|
||||
lex.h \
|
||||
id.h \
|
||||
keys.c \
|
||||
ike_alg.c \
|
||||
keys.h \
|
||||
md5.c \
|
||||
md5.h \
|
||||
kernel_noklips.c \
|
||||
ike_alg.h \
|
||||
rcv_whack.c \
|
||||
rcv_whack.h \
|
||||
alg_info.c \
|
||||
alg_info.h \
|
||||
pem.c \
|
||||
kernel_noklips.h \
|
||||
foodgroups.c \
|
||||
pem.h \
|
||||
kernel_netlink.c \
|
||||
foodgroups.h \
|
||||
vendor.c \
|
||||
vendor.h \
|
||||
packet.c \
|
||||
packet.h \
|
||||
crl.c \
|
||||
md2.c \
|
||||
rnd.c \
|
||||
crl.h \
|
||||
md2.h \
|
||||
spdb.c \
|
||||
rnd.h \
|
||||
spdb.h \
|
||||
modecfg.c \
|
||||
timer.h \
|
||||
nat_traversal.c \
|
||||
server.c \
|
||||
dsa.c \
|
||||
plutomain.c \
|
||||
modecfg.h \
|
||||
kernel_netlink.h \
|
||||
nat_traversal.h \
|
||||
server.h \
|
||||
dsa.h \
|
||||
timer.c \
|
||||
crypto.c \
|
||||
pkcs1.c \
|
||||
log.c \
|
||||
defs.c \
|
||||
demux.c \
|
||||
crypto.h \
|
||||
pkcs1.h \
|
||||
log.h \
|
||||
defs.h \
|
||||
demux.h
|
||||
|
||||
_pluto_adns_SOURCES = adns.c adns.h
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libfreeswan -I$(top_srcdir)/src/libcrypto -I$(top_srcdir)/src/whack
|
||||
AM_CFLAGS = -DIPSEC_DIR=\"${ipsecdir}\" -DIPSEC_CONFDIR=\"${confdir}\" -DIPSEC_PIDDIR=\"${piddir}\" \
|
||||
-DDEBUG -DKERNEL26_SUPPORT -DKERNEL26_HAS_KAME_DUPLICATES -DNAT_TRAVERSAL -DVIRTUAL_IP -DPLUTO \
|
||||
-DVENDORID -DSHARED_SECRETS_FILE=\"${confdir}/ipsec.secrets\" -DTHREADS -DKLIPS
|
||||
pluto_LDADD = $(top_srcdir)/src/libfreeswan/libfreeswan.a $(top_srcdir)/src/libcrypto/libcrypto.a -lgmp -lresolv -lpthread
|
||||
_pluto_adns_LDADD = -lresolv $(top_srcdir)/src/libfreeswan/libfreeswan.a
|
||||
dist_man_MANS = pluto.8 ipsec.secrets.5
|
||||
EXTRA_DIST = oid.pl oid.txt
|
||||
|
||||
# TODO: get perl from ./configure
|
||||
PERL=perl
|
||||
|
||||
oid.c: oid.txt oid.pl
|
||||
$PERL oid.pl
|
||||
|
||||
oid.h: oid.txt oid.pl
|
||||
$PERL oid.pl
|
||||
|
||||
# This compile option activates dynamic URL fetching using libcurl
|
||||
if USE_LIBCURL
|
||||
pluto_LDADD += -lcurl
|
||||
endif
|
||||
|
||||
# This compile option activates dynamic LDAP CRL fetching
|
||||
if USE_LDAP
|
||||
pluto_LDADD += -lldap -llber
|
||||
endif
|
||||
|
||||
# This compile option activates smartcard support
|
||||
if USE_SMARTCARD
|
||||
AM_CFLAGS += -DSMARTCARD
|
||||
pluto_LDADD += -ldl
|
||||
endif
|
||||
|
||||
install-exec-local :
|
||||
mkdir -p -m 755 $(confdir)/ipsec.d
|
||||
mkdir -p -m 755 $(confdir)/ipsec.d/cacerts
|
||||
mkdir -p -m 755 $(confdir)/ipsec.d/ocspcerts
|
||||
mkdir -p -m 755 $(confdir)/ipsec.d/certs
|
||||
mkdir -p -m 755 $(confdir)/ipsec.d/acerts
|
||||
mkdir -p -m 755 $(confdir)/ipsec.d/aacerts
|
||||
mkdir -p -m 755 $(confdir)/ipsec.d/crls
|
||||
mkdir -p -m 755 $(confdir)/ipsec.d/reqs
|
||||
mkdir -p -m 700 $(confdir)/ipsec.d/private
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
## IKE algorithms config. for static linking into pluto
|
||||
## By now 3DES,MD5 and SHA1 are already present in pluto.
|
||||
##
|
||||
CONFIG_IKE_ALG_AES=y
|
||||
CONFIG_IKE_ALG_BLOWFISH=y
|
||||
CONFIG_IKE_ALG_SERPENT=y
|
||||
CONFIG_IKE_ALG_TWOFISH=y
|
||||
CONFIG_IKE_ALG_SHA2=y
|
||||
|
||||
Optional building of algorithms has not been ported to the
|
||||
new build system with autotools. As all the crypto stuff
|
||||
will go into libstrongswan soon, we willll provide this
|
||||
possibility there...
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
# pluto/alg Makefile
|
||||
# Author: JuanJo Ciarlante <jjo-ipsec@mendoza.gov.ar>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 2 of the License, or (at your
|
||||
# option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# $Id: Makefile,v 1.3 2004/06/23 04:45:20 as Exp $
|
||||
|
||||
Make.common: ../Makefile
|
||||
make -s -C .. showdefs > $@
|
||||
|
||||
-include Make.common
|
||||
include Config.ike_alg
|
||||
|
||||
LIBCRYPTO:=../../../lib/libcrypto
|
||||
ALLFLAGS=$(CPPFLAGS) $(CFLAGS) -I .. -I- -I ../../../linux/include -I $(LIBCRYPTO)
|
||||
LIBALG := libalg.o
|
||||
|
||||
all : $(LIBALG)
|
||||
|
||||
include $(wildcard Makefile.ike_alg_*)
|
||||
#include $(wildcard Makefile.ike_alg_[ab]*)
|
||||
|
||||
ALG_DIRS:=$(ALG_DIRS-y)
|
||||
ALG_LIBS:=$(ALG_LIBS-y)
|
||||
ALG_SRCS:=$(ALG_SRCS-y)
|
||||
ALG_OBJS:=$(ALG_OBJS-y)
|
||||
$(LIBALG): ike_alginit.o $(ALG_OBJS) $(ALG_LIBS)
|
||||
$(LD) -r -o $@ $^
|
||||
|
||||
# Search for IKE_ALG_INIT_NAME: in ike_alg_*.c to
|
||||
# build ike_alginit.c:ike_alginit()
|
||||
|
||||
ike_alginit.c: $(ALG_SRCS) Makefile Config.ike_alg
|
||||
@awk ' \
|
||||
BEGIN { print "extern int ike_alg_init(void); \
|
||||
int ike_alg_init(void) {" } \
|
||||
/IKE_ALG_INIT_NAME:/ \
|
||||
{ print "{ extern int " $$2" (void); " $$2 "();}" } \
|
||||
END { print "return 0;}" } \
|
||||
' $(ALG_SRCS) /dev/null > $@
|
||||
|
||||
clean :
|
||||
@for i in $(ALG_DIRS);do make -C $$i clean;done
|
||||
rm -f *.[oa] ike_alginit.c Make.common
|
||||
|
||||
gatherdeps:
|
||||
@ls $(ALG_SRCS) | grep '\.c' | sed -e 's/\(.*\)\.c$$/\1.o: \1.c/'
|
||||
@echo
|
||||
@ls $(ALG_SRCS) | grep '\.c' | xargs grep '^#[ ]*include[ ]*"' | \
|
||||
sed -n -e '/#include.*"lib/d' \
|
||||
-e 's/\.c:#[ ]*include[ ]*"/.o: ..\//' -e 's/".*//p'
|
||||
|
||||
# Dependencies generated by "make gatherdeps":
|
||||
|
||||
ike_alg_aes.o: ike_alg_aes.c
|
||||
ike_alg_blowfish.o: ike_alg_blowfish.c
|
||||
ike_alg_serpent.o: ike_alg_serpent.c
|
||||
ike_alg_sha2.o: ike_alg_sha2.c
|
||||
ike_alg_twofish.o: ike_alg_twofish.c
|
||||
|
||||
ike_alg_aes.o: ../constants.h
|
||||
ike_alg_aes.o: ../defs.h
|
||||
ike_alg_aes.o: ../log.h
|
||||
ike_alg_aes.o: ../alg_info.h
|
||||
ike_alg_aes.o: ../ike_alg.h
|
||||
ike_alg_blowfish.o: ../constants.h
|
||||
ike_alg_blowfish.o: ../defs.h
|
||||
ike_alg_blowfish.o: ../log.h
|
||||
ike_alg_blowfish.o: ../alg_info.h
|
||||
ike_alg_blowfish.o: ../ike_alg.h
|
||||
ike_alg_serpent.o: ../constants.h
|
||||
ike_alg_serpent.o: ../defs.h
|
||||
ike_alg_serpent.o: ../log.h
|
||||
ike_alg_serpent.o: ../alg_info.h
|
||||
ike_alg_serpent.o: ../ike_alg.h
|
||||
ike_alg_sha2.o: ../constants.h
|
||||
ike_alg_sha2.o: ../defs.h
|
||||
ike_alg_sha2.o: ../log.h
|
||||
ike_alg_sha2.o: ../alg_info.h
|
||||
ike_alg_sha2.o: ../ike_alg.h
|
||||
ike_alg_twofish.o: ../constants.h
|
||||
ike_alg_twofish.o: ../defs.h
|
||||
ike_alg_twofish.o: ../log.h
|
||||
ike_alg_twofish.o: ../alg_info.h
|
||||
ike_alg_twofish.o: ../ike_alg.h
|
|
@ -1,14 +0,0 @@
|
|||
ALG:=aes
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_AES)
|
||||
DIR_AES:=$(LIBCRYPTO)/libaes
|
||||
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_AES)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_AES)/libaes.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_AES)/libaes.a:
|
||||
make -C $(DIR_AES) CFLAGS="$(CFLAGS)" libaes.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_AES) $(COPTS) $(ALLFLAGS) -c $<
|
|
@ -1,13 +0,0 @@
|
|||
ALG:=blowfish
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_BLOWFISH)
|
||||
DIR_BLOWFISH:=$(LIBCRYPTO)/libblowfish
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_BLOWFISH)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_BLOWFISH)/libblowfish.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_BLOWFISH)/libblowfish.a:
|
||||
make -C $(DIR_BLOWFISH) CFLAGS="$(CFLAGS)" libblowfish.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_BLOWFISH) $(COPTS) $(ALLFLAGS) -c $<
|
|
@ -1,13 +0,0 @@
|
|||
ALG:=serpent
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_SERPENT)
|
||||
DIR_SERPENT:=$(LIBCRYPTO)/libserpent
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_SERPENT)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_SERPENT)/libserpent.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_SERPENT)/libserpent.a:
|
||||
make -C $(DIR_SERPENT) CFLAGS="$(CFLAGS)" libserpent.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_SERPENT) $(COPTS) $(ALLFLAGS) -c $<
|
|
@ -1,13 +0,0 @@
|
|||
ALG:=sha2
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_SHA2)
|
||||
DIR_SHA2:=$(LIBCRYPTO)/libsha2
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_SHA2)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_SHA2)/libsha2.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_SHA2)/libsha2.a:
|
||||
make -C $(DIR_SHA2) libsha2.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_SHA2) $(COPTS) $(ALLFLAGS) -c $<
|
|
@ -1,13 +0,0 @@
|
|||
ALG:=twofish
|
||||
CONFIG_YES:=$(CONFIG_IKE_ALG_TWOFISH)
|
||||
DIR_TWOFISH:=$(LIBCRYPTO)/libtwofish
|
||||
ALG_DIRS-$(CONFIG_YES) := $(ALG_DIRS-$(CONFIG_YES)) $(DIR_TWOFISH)
|
||||
ALG_LIBS-$(CONFIG_YES) := $(ALG_LIBS-$(CONFIG_YES)) $(DIR_TWOFISH)/libtwofish.a
|
||||
ALG_SRCS-$(CONFIG_YES) := $(ALG_SRCS-$(CONFIG_YES)) ike_alg_$(ALG).c
|
||||
ALG_OBJS-$(CONFIG_YES) := $(ALG_OBJS-$(CONFIG_YES)) ike_alg_$(ALG).o
|
||||
|
||||
$(DIR_TWOFISH)/libtwofish.a:
|
||||
make -C $(DIR_TWOFISH) CFLAGS="$(CFLAGS)" libtwofish.a
|
||||
|
||||
ike_alg_$(ALG).o: ike_alg_$(ALG).c
|
||||
$(CC) -I $(LIBCRYPTO) -I$(DIR_TWOFISH) $(COPTS) $(ALLFLAGS) -c $<
|
|
@ -0,0 +1,7 @@
|
|||
extern int ike_alg_init(void); int ike_alg_init(void) {
|
||||
{ extern int ike_alg_aes_init (void); ike_alg_aes_init();}
|
||||
{ extern int ike_alg_blowfish_init (void); ike_alg_blowfish_init();}
|
||||
{ extern int ike_alg_serpent_init (void); ike_alg_serpent_init();}
|
||||
{ extern int ike_alg_sha2_init (void); ike_alg_sha2_init();}
|
||||
{ extern int ike_alg_twofish_init (void); ike_alg_twofish_init();}
|
||||
return 0;}
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <ctype.h>
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
#include <pfkeyv2.h>
|
||||
|
||||
#include "alg_info.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <sys/types.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
/* path definitions for private keys, end certs,
|
||||
* cacerts, attribute certs and crls
|
||||
*/
|
||||
#define PRIVATE_KEY_PATH "/etc/ipsec.d/private"
|
||||
#define HOST_CERT_PATH "/etc/ipsec.d/certs"
|
||||
#define CA_CERT_PATH "/etc/ipsec.d/cacerts"
|
||||
#define A_CERT_PATH "/etc/ipsec.d/acerts"
|
||||
#define AA_CERT_PATH "/etc/ipsec.d/aacerts"
|
||||
#define OCSP_CERT_PATH "/etc/ipsec.d/ocspcerts"
|
||||
#define CRL_PATH "/etc/ipsec.d/crls"
|
||||
#define REQ_PATH "/etc/ipsec.d/reqs"
|
||||
#define PRIVATE_KEY_PATH IPSEC_CONFDIR "/ipsec.d/private"
|
||||
#define HOST_CERT_PATH IPSEC_CONFDIR "/ipsec.d/certs"
|
||||
#define CA_CERT_PATH IPSEC_CONFDIR "/ipsec.d/cacerts"
|
||||
#define A_CERT_PATH IPSEC_CONFDIR "/ipsec.d/acerts"
|
||||
#define AA_CERT_PATH IPSEC_CONFDIR "/ipsec.d/aacerts"
|
||||
#define OCSP_CERT_PATH IPSEC_CONFDIR "/ipsec.d/ocspcerts"
|
||||
#define CRL_PATH IPSEC_CONFDIR "/ipsec.d/crls"
|
||||
#define REQ_PATH IPSEC_CONFDIR "/ipsec.d/reqs"
|
||||
|
||||
/* advance warning of imminent expiry of
|
||||
* cacerts, public keys, and crls
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <sys/queue.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
#include "kameipsec.h"
|
||||
|
||||
#include "constants.h"
|
||||
|
@ -58,7 +58,6 @@
|
|||
#include "whack.h"
|
||||
#include "alg_info.h"
|
||||
#include "ike_alg.h"
|
||||
#include "kernel_alg.h"
|
||||
#ifdef NAT_TRAVERSAL
|
||||
#include "nat_traversal.h"
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <netinet/in.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -63,9 +63,11 @@ typedef unsigned long long lset_t;
|
|||
#define LDISJOINT(a, b) (((a) & (b)) == LEMPTY)
|
||||
|
||||
/* Control and lock pathnames */
|
||||
|
||||
#ifndef IPSEC_PIDDIR
|
||||
# define IPSEC_PIDDIR "/var/run"
|
||||
#endif
|
||||
#ifndef DEFAULT_CTLBASE
|
||||
# define DEFAULT_CTLBASE "/var/run/pluto"
|
||||
# define DEFAULT_CTLBASE IPSEC_PIDDIR "/pluto"
|
||||
#endif
|
||||
|
||||
#define CTL_SUFFIX ".ctl" /* for UNIX domain socket pathname */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <sys/types.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <freeswan.h>
|
||||
#define HEADER_DES_LOCL_H /* stupid trick to force prototype decl in <des.h> */
|
||||
#include <crypto/des.h>
|
||||
#include <libdes/des.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <sys/queue.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "adns.h" /* needs <resolv.h> */
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
/* Food group config files are found in directory fg_path */
|
||||
|
||||
#ifndef POLICYGROUPSDIR
|
||||
#define POLICYGROUPSDIR "/etc/ipsec.d/policies"
|
||||
#define POLICYGROUPSDIR IPSEC_CONFDIR "/ipsec.d/policies"
|
||||
#endif
|
||||
|
||||
const char *policygroups_dir = POLICYGROUPSDIR;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <sys/queue.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <sys/queue.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <sys/time.h> /* for gettimeofday */
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <arpa/inet.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#ifdef KLIPS
|
||||
#include <signal.h>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <pfkey.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#endif
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "certs.h"
|
||||
|
||||
#ifndef SHARED_SECRETS_FILE
|
||||
# define SHARED_SECRETS_FILE "/etc/ipsec.secrets"
|
||||
# define SHARED_SECRETS_FILE IPSEC_CONFDIR "/ipsec.secrets"
|
||||
#endif
|
||||
|
||||
const char *shared_secrets_file;
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
#define LOG_WIDTH 1024 /* roof of number of chars in log line */
|
||||
|
||||
#ifndef PERPERRLOGDIR
|
||||
#define PERPERRLOGDIR "/var/log/pluto/peer"
|
||||
#ifndef PERPEERLOGDIR
|
||||
#define PERPEERLOGDIR "/var/log/pluto/peer"
|
||||
#endif
|
||||
|
||||
/* our versions of assert: log result */
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <sys/queue.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
#include <pfkeyv2.h>
|
||||
#include <pfkey.h>
|
||||
#include "constants.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <fcntl.h>
|
||||
|
||||
#include <freeswan.h>
|
||||
#include <freeswan/ipsec_policy.h>
|
||||
#include <ipsec_policy.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include <freeswan.h>
|
||||
#define HEADER_DES_LOCL_H /* stupid trick to force prototype decl in <des.h> */
|
||||
#include <crypto/des.h>
|
||||
#include <libdes/des.h>
|
||||
|
||||
#include "constants.h"
|
||||
#include "defs.h"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue