Added plugin stub for AF_ALG
This commit is contained in:
@@ -136,6 +136,13 @@ else
|
||||
SUBDIRS = .
|
||||
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
|
||||
SUBDIRS += plugins/aes
|
||||
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_ @}*/
|
||||
Reference in New Issue
Block a user