Added plugin stub for AF_ALG
This commit is contained in:
parent
e44817df6f
commit
71c87e3483
|
@ -86,6 +86,7 @@ ARG_DISBL_SET([dnskey], [disable DNS RR key decoding plugin.])
|
||||||
ARG_DISBL_SET([pem], [disable PEM decoding plugin.])
|
ARG_DISBL_SET([pem], [disable PEM decoding plugin.])
|
||||||
ARG_DISBL_SET([hmac], [disable HMAC crypto implementation plugin.])
|
ARG_DISBL_SET([hmac], [disable HMAC crypto implementation plugin.])
|
||||||
ARG_DISBL_SET([xcbc], [disable xcbc crypto implementation plugin.])
|
ARG_DISBL_SET([xcbc], [disable xcbc crypto implementation plugin.])
|
||||||
|
ARG_ENABL_SET([af-alg], [enable AF_ALG crypto interface to Linux Crypto API.])
|
||||||
ARG_ENABL_SET([test-vectors], [enable plugin providing crypto test vectors.])
|
ARG_ENABL_SET([test-vectors], [enable plugin providing crypto test vectors.])
|
||||||
ARG_ENABL_SET([mysql], [enable MySQL database support. Requires libmysqlclient_r.])
|
ARG_ENABL_SET([mysql], [enable MySQL database support. Requires libmysqlclient_r.])
|
||||||
ARG_ENABL_SET([sqlite], [enable SQLite database support. Requires libsqlite3.])
|
ARG_ENABL_SET([sqlite], [enable SQLite database support. Requires libsqlite3.])
|
||||||
|
@ -735,6 +736,7 @@ ADD_PLUGIN([hmac], [s libcharon pluto scripts])
|
||||||
ADD_PLUGIN([ctr], [s libcharon scripts])
|
ADD_PLUGIN([ctr], [s libcharon scripts])
|
||||||
ADD_PLUGIN([ccm], [s libcharon scripts])
|
ADD_PLUGIN([ccm], [s libcharon scripts])
|
||||||
ADD_PLUGIN([gcm], [s libcharon scripts])
|
ADD_PLUGIN([gcm], [s libcharon scripts])
|
||||||
|
ADD_PLUGIN([af-alg], [s libcharon pluto openac scepclient pki scripts medsrv])
|
||||||
ADD_PLUGIN([xauth], [p pluto])
|
ADD_PLUGIN([xauth], [p pluto])
|
||||||
ADD_PLUGIN([attr], [h libcharon pluto])
|
ADD_PLUGIN([attr], [h libcharon pluto])
|
||||||
ADD_PLUGIN([attr-sql], [h libcharon pluto])
|
ADD_PLUGIN([attr-sql], [h libcharon pluto])
|
||||||
|
@ -836,6 +838,7 @@ AM_CONDITIONAL(USE_PKCS11, test x$pkcs11 = xtrue)
|
||||||
AM_CONDITIONAL(USE_CTR, test x$ctr = xtrue)
|
AM_CONDITIONAL(USE_CTR, test x$ctr = xtrue)
|
||||||
AM_CONDITIONAL(USE_CCM, test x$ccm = xtrue)
|
AM_CONDITIONAL(USE_CCM, test x$ccm = xtrue)
|
||||||
AM_CONDITIONAL(USE_GCM, test x$gcm = xtrue)
|
AM_CONDITIONAL(USE_GCM, test x$gcm = xtrue)
|
||||||
|
AM_CONDITIONAL(USE_AF_ALG, test x$af_alg = xtrue)
|
||||||
|
|
||||||
dnl charon plugins
|
dnl charon plugins
|
||||||
dnl ==============
|
dnl ==============
|
||||||
|
@ -978,6 +981,7 @@ AC_OUTPUT(
|
||||||
src/libstrongswan/plugins/ctr/Makefile
|
src/libstrongswan/plugins/ctr/Makefile
|
||||||
src/libstrongswan/plugins/ccm/Makefile
|
src/libstrongswan/plugins/ccm/Makefile
|
||||||
src/libstrongswan/plugins/gcm/Makefile
|
src/libstrongswan/plugins/gcm/Makefile
|
||||||
|
src/libstrongswan/plugins/af_alg/Makefile
|
||||||
src/libstrongswan/plugins/test_vectors/Makefile
|
src/libstrongswan/plugins/test_vectors/Makefile
|
||||||
src/libhydra/Makefile
|
src/libhydra/Makefile
|
||||||
src/libhydra/plugins/attr/Makefile
|
src/libhydra/plugins/attr/Makefile
|
||||||
|
|
|
@ -136,6 +136,13 @@ else
|
||||||
SUBDIRS = .
|
SUBDIRS = .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_AF_ALG
|
||||||
|
SUBDIRS += plugins/af_alg
|
||||||
|
if MONOLITHIC
|
||||||
|
libstrongswan_la_LIBADD += plugins/af_alg/libstrongswan-af-alg.la
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
if USE_AES
|
if USE_AES
|
||||||
SUBDIRS += plugins/aes
|
SUBDIRS += plugins/aes
|
||||||
if MONOLITHIC
|
if MONOLITHIC
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
INCLUDES = -I$(top_srcdir)/src/libstrongswan
|
||||||
|
|
||||||
|
AM_CFLAGS = -rdynamic
|
||||||
|
|
||||||
|
if MONOLITHIC
|
||||||
|
noinst_LTLIBRARIES = libstrongswan-af-alg.la
|
||||||
|
else
|
||||||
|
plugin_LTLIBRARIES = libstrongswan-af-alg.la
|
||||||
|
endif
|
||||||
|
|
||||||
|
libstrongswan_af_alg_la_SOURCES = \
|
||||||
|
af_alg_plugin.h af_alg_plugin.c
|
||||||
|
|
||||||
|
libstrongswan_af_alg_la_LDFLAGS = -module -avoid-version
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2010 Martin Willi
|
||||||
|
* Copyright (C) 2010 revosec AG
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "af_alg_plugin.h"
|
||||||
|
|
||||||
|
#include <library.h>
|
||||||
|
|
||||||
|
typedef struct private_af_alg_plugin_t private_af_alg_plugin_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* private data of af_alg_plugin
|
||||||
|
*/
|
||||||
|
struct private_af_alg_plugin_t {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* public functions
|
||||||
|
*/
|
||||||
|
af_alg_plugin_t public;
|
||||||
|
};
|
||||||
|
|
||||||
|
METHOD(plugin_t, destroy, void,
|
||||||
|
private_af_alg_plugin_t *this)
|
||||||
|
{
|
||||||
|
free(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* see header file
|
||||||
|
*/
|
||||||
|
plugin_t *af_alg_plugin_create()
|
||||||
|
{
|
||||||
|
private_af_alg_plugin_t *this;
|
||||||
|
|
||||||
|
INIT(this,
|
||||||
|
.public = {
|
||||||
|
.plugin = {
|
||||||
|
.destroy = _destroy,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return &this->public.plugin;
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2010 Martin Willi
|
||||||
|
* Copyright (C) 2010 revosec AG
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @defgroup af_alg af_alg
|
||||||
|
* @ingroup plugins
|
||||||
|
*
|
||||||
|
* @defgroup af_alg_plugin af_alg_plugin
|
||||||
|
* @{ @ingroup af_alg
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AF_ALG_PLUGIN_H_
|
||||||
|
#define AF_ALG_PLUGIN_H_
|
||||||
|
|
||||||
|
#include <plugins/plugin.h>
|
||||||
|
|
||||||
|
typedef struct af_alg_plugin_t af_alg_plugin_t;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin providing the AF_ALG interface to the Linux Crypto API.
|
||||||
|
*/
|
||||||
|
struct af_alg_plugin_t {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements plugin interface.
|
||||||
|
*/
|
||||||
|
plugin_t plugin;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /** AF_ALG_PLUGIN_H_ @}*/
|
Loading…
Reference in New Issue