Moved TLS stack to its own library
This commit is contained in:
@@ -531,6 +531,7 @@ INPUT = @SRC_DIR@/src/libstrongswan \
|
|||||||
@SRC_DIR@/src/libhydra \
|
@SRC_DIR@/src/libhydra \
|
||||||
@SRC_DIR@/src/libcharon \
|
@SRC_DIR@/src/libcharon \
|
||||||
@SRC_DIR@/src/libsimaka \
|
@SRC_DIR@/src/libsimaka \
|
||||||
|
@SRC_DIR@/src/libtls \
|
||||||
@SRC_DIR@/src/libfast \
|
@SRC_DIR@/src/libfast \
|
||||||
@SRC_DIR@/src/manager
|
@SRC_DIR@/src/manager
|
||||||
|
|
||||||
|
|||||||
@@ -225,6 +225,10 @@ if test x$eap_sim = xtrue; then
|
|||||||
simaka=true;
|
simaka=true;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x$eap_tls = xtrue; then
|
||||||
|
tls=true;
|
||||||
|
fi
|
||||||
|
|
||||||
if test x$fips_prf = xtrue; then
|
if test x$fips_prf = xtrue; then
|
||||||
if test x$openssl = xfalse; then
|
if test x$openssl = xfalse; then
|
||||||
sha1=true;
|
sha1=true;
|
||||||
@@ -895,6 +899,7 @@ AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
|
|||||||
AM_CONDITIONAL(USE_LIBCAP, test x$capabilities = xlibcap)
|
AM_CONDITIONAL(USE_LIBCAP, test x$capabilities = xlibcap)
|
||||||
AM_CONDITIONAL(USE_VSTR, test x$vstr = xtrue)
|
AM_CONDITIONAL(USE_VSTR, test x$vstr = xtrue)
|
||||||
AM_CONDITIONAL(USE_SIMAKA, test x$simaka = xtrue)
|
AM_CONDITIONAL(USE_SIMAKA, test x$simaka = xtrue)
|
||||||
|
AM_CONDITIONAL(USE_TLS, test x$tls = xtrue)
|
||||||
AM_CONDITIONAL(MONOLITHIC, test x$monolithic = xtrue)
|
AM_CONDITIONAL(MONOLITHIC, test x$monolithic = xtrue)
|
||||||
|
|
||||||
dnl ==============================
|
dnl ==============================
|
||||||
@@ -955,6 +960,7 @@ AC_OUTPUT(
|
|||||||
src/libhydra/plugins/resolve/Makefile
|
src/libhydra/plugins/resolve/Makefile
|
||||||
src/libfreeswan/Makefile
|
src/libfreeswan/Makefile
|
||||||
src/libsimaka/Makefile
|
src/libsimaka/Makefile
|
||||||
|
src/libtls/Makefile
|
||||||
src/pluto/Makefile
|
src/pluto/Makefile
|
||||||
src/pluto/plugins/xauth/Makefile
|
src/pluto/plugins/xauth/Makefile
|
||||||
src/whack/Makefile
|
src/whack/Makefile
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ if USE_SIMAKA
|
|||||||
SUBDIRS += libsimaka
|
SUBDIRS += libsimaka
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_TLS
|
||||||
|
SUBDIRS += libtls
|
||||||
|
endif
|
||||||
|
|
||||||
if USE_FILE_CONFIG
|
if USE_FILE_CONFIG
|
||||||
SUBDIRS += libfreeswan starter ipsec _copyright
|
SUBDIRS += libfreeswan starter ipsec _copyright
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -352,6 +352,13 @@ if MONOLITHIC
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_TLS
|
||||||
|
if MONOLITHIC
|
||||||
|
# otherwise this library is linked to eap_tls
|
||||||
|
libcharon_la_LIBADD += $(top_builddir)/src/libtls/libtls.la
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
if USE_MEDSRV
|
if USE_MEDSRV
|
||||||
SUBDIRS += plugins/medsrv
|
SUBDIRS += plugins/medsrv
|
||||||
PLUGINS += medsrv
|
PLUGINS += medsrv
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libhydra \
|
INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libhydra \
|
||||||
-I$(top_srcdir)/src/libcharon
|
-I$(top_srcdir)/src/libcharon -I$(top_srcdir)/src/libtls
|
||||||
|
|
||||||
AM_CFLAGS = -rdynamic
|
AM_CFLAGS = -rdynamic
|
||||||
|
|
||||||
@@ -8,18 +8,10 @@ if MONOLITHIC
|
|||||||
noinst_LTLIBRARIES = libstrongswan-eap-tls.la
|
noinst_LTLIBRARIES = libstrongswan-eap-tls.la
|
||||||
else
|
else
|
||||||
plugin_LTLIBRARIES = libstrongswan-eap-tls.la
|
plugin_LTLIBRARIES = libstrongswan-eap-tls.la
|
||||||
|
libstrongswan_eap_tls_la_LIBADD = $(top_builddir)/src/libtls/libtls.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libstrongswan_eap_tls_la_SOURCES = eap_tls_plugin.h eap_tls_plugin.c \
|
libstrongswan_eap_tls_la_SOURCES = \
|
||||||
eap_tls.h eap_tls.c tls/tls.h tls/tls.c \
|
eap_tls_plugin.h eap_tls_plugin.c eap_tls.h eap_tls.c
|
||||||
tls/tls_protection.h tls/tls_protection.c \
|
|
||||||
tls/tls_compression.h tls/tls_compression.c \
|
|
||||||
tls/tls_fragmentation.h tls/tls_fragmentation.c \
|
|
||||||
tls/tls_crypto.h tls/tls_crypto.c \
|
|
||||||
tls/tls_prf.h tls/tls_prf.c \
|
|
||||||
tls/tls_reader.h tls/tls_reader.c \
|
|
||||||
tls/tls_writer.h tls/tls_writer.c \
|
|
||||||
tls/tls_peer.h tls/tls_peer.c \
|
|
||||||
tls/tls_server.h tls/tls_server.c \
|
|
||||||
tls/tls_handshake.h
|
|
||||||
libstrongswan_eap_tls_la_LDFLAGS = -module -avoid-version
|
libstrongswan_eap_tls_la_LDFLAGS = -module -avoid-version
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "eap_tls.h"
|
#include "eap_tls.h"
|
||||||
|
|
||||||
#include "tls/tls.h"
|
#include <tls.h>
|
||||||
|
|
||||||
#include <daemon.h>
|
#include <daemon.h>
|
||||||
#include <library.h>
|
#include <library.h>
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
INCLUDES = -I$(top_srcdir)/src/libstrongswan
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES = libtls.la
|
||||||
|
libtls_la_SOURCES = \
|
||||||
|
tls_protection.h tls_protection.c \
|
||||||
|
tls_compression.h tls_compression.c \
|
||||||
|
tls_fragmentation.h tls_fragmentation.c \
|
||||||
|
tls_crypto.h tls_crypto.c \
|
||||||
|
tls_prf.h tls_prf.c \
|
||||||
|
tls_reader.h tls_reader.c \
|
||||||
|
tls_writer.h tls_writer.c \
|
||||||
|
tls_peer.h tls_peer.c \
|
||||||
|
tls_server.h tls_server.c \
|
||||||
|
tls_handshake.h tls.h tls.c
|
||||||
@@ -22,8 +22,6 @@
|
|||||||
#include "tls_server.h"
|
#include "tls_server.h"
|
||||||
#include "tls_peer.h"
|
#include "tls_peer.h"
|
||||||
|
|
||||||
#include <daemon.h>
|
|
||||||
|
|
||||||
ENUM_BEGIN(tls_version_names, SSL_2_0, SSL_2_0,
|
ENUM_BEGIN(tls_version_names, SSL_2_0, SSL_2_0,
|
||||||
"SSLv2");
|
"SSLv2");
|
||||||
ENUM_NEXT(tls_version_names, SSL_3_0, TLS_1_2, SSL_2_0,
|
ENUM_NEXT(tls_version_names, SSL_3_0, TLS_1_2, SSL_2_0,
|
||||||
@@ -14,11 +14,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tlsgroup tls
|
* @defgroup libtls libtls
|
||||||
* @{ @ingroup eap_tls
|
*
|
||||||
|
* @addtogroup libtls
|
||||||
|
* TLS implementation on top of libstrongswan
|
||||||
*
|
*
|
||||||
* @defgroup tls tls
|
* @defgroup tls tls
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_H_
|
#ifndef TLS_H_
|
||||||
@@ -15,8 +15,6 @@
|
|||||||
|
|
||||||
#include "tls_compression.h"
|
#include "tls_compression.h"
|
||||||
|
|
||||||
#include <daemon.h>
|
|
||||||
|
|
||||||
typedef struct private_tls_compression_t private_tls_compression_t;
|
typedef struct private_tls_compression_t private_tls_compression_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_compression tls_compression
|
* @defgroup tls_compression tls_compression
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_COMPRESSION_H_
|
#ifndef TLS_COMPRESSION_H_
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "tls_crypto.h"
|
#include "tls_crypto.h"
|
||||||
|
|
||||||
#include <daemon.h>
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct private_tls_crypto_t private_tls_crypto_t;
|
typedef struct private_tls_crypto_t private_tls_crypto_t;
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_crypto tls_crypto
|
* @defgroup tls_crypto tls_crypto
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_CRYPTO_H_
|
#ifndef TLS_CRYPTO_H_
|
||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "tls_reader.h"
|
#include "tls_reader.h"
|
||||||
|
|
||||||
#include <daemon.h>
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct private_tls_fragmentation_t private_tls_fragmentation_t;
|
typedef struct private_tls_fragmentation_t private_tls_fragmentation_t;
|
||||||
|
|
||||||
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_fragmentation tls_fragmentation
|
* @defgroup tls_fragmentation tls_fragmentation
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_FRAGMENTATION_H_
|
#ifndef TLS_FRAGMENTATION_H_
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 Martin Willi
|
* Copyright (C) 2010 Martin Willi
|
||||||
* Hochschule fuer Technik Rapperswil
|
* Copyright (C) 2010 revosec AG
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* 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
|
* under the terms of the GNU General Public License as published by the
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_handshake tls_handshake
|
* @defgroup tls_handshake tls_handshake
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_HANDSHAKE_H_
|
#ifndef TLS_HANDSHAKE_H_
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "tls_peer.h"
|
#include "tls_peer.h"
|
||||||
|
|
||||||
#include <daemon.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_peer tls_peer
|
* @defgroup tls_peer tls_peer
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_PEER_H_
|
#ifndef TLS_PEER_H_
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_prf tls_prf
|
* @defgroup tls_prf tls_prf
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_PRF_H_
|
#ifndef TLS_PRF_H_
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "tls_protection.h"
|
#include "tls_protection.h"
|
||||||
|
|
||||||
#include <daemon.h>
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct private_tls_protection_t private_tls_protection_t;
|
typedef struct private_tls_protection_t private_tls_protection_t;
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_protection tls_protection
|
* @defgroup tls_protection tls_protection
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_PROTECTION_H_
|
#ifndef TLS_PROTECTION_H_
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 Martin Willi
|
* Copyright (C) 2010 Martin Willi
|
||||||
* Hochschule fuer Technik Rapperswil
|
* Copyright (C) 2010 revosec AG
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* 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
|
* under the terms of the GNU General Public License as published by the
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "tls_reader.h"
|
#include "tls_reader.h"
|
||||||
|
|
||||||
#include <daemon.h>
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct private_tls_reader_t private_tls_reader_t;
|
typedef struct private_tls_reader_t private_tls_reader_t;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 Martin Willi
|
* Copyright (C) 2010 Martin Willi
|
||||||
* Hochschule fuer Technik Rapperswil
|
* Copyright (C) 2010 revosec AG
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* 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
|
* under the terms of the GNU General Public License as published by the
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_reader tls_reader
|
* @defgroup tls_reader tls_reader
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_READER_H_
|
#ifndef TLS_READER_H_
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <daemon.h>
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct private_tls_server_t private_tls_server_t;
|
typedef struct private_tls_server_t private_tls_server_t;
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_server tls_server
|
* @defgroup tls_server tls_server
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_SERVER_H_
|
#ifndef TLS_SERVER_H_
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 Martin Willi
|
* Copyright (C) 2010 Martin Willi
|
||||||
* Hochschule fuer Technik Rapperswil
|
* Copyright (C) 2010 revosec AG
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* 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
|
* under the terms of the GNU General Public License as published by the
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 Martin Willi
|
* Copyright (C) 2010 Martin Willi
|
||||||
* Hochschule fuer Technik Rapperswil
|
* Copyright (C) 2010 revosec AG
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* 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
|
* under the terms of the GNU General Public License as published by the
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup tls_writer tls_writer
|
* @defgroup tls_writer tls_writer
|
||||||
* @{ @ingroup tls
|
* @{ @ingroup libtls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TLS_WRITER_H_
|
#ifndef TLS_WRITER_H_
|
||||||
Reference in New Issue
Block a user