Added plugin stub of certexpire plugin
This commit is contained in:
@@ -431,6 +431,13 @@ if MONOLITHIC
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_CERTEXPIRE
|
||||
SUBDIRS += plugins/certexpire
|
||||
if MONOLITHIC
|
||||
libcharon_la_LIBADD += plugins/certexpire/libstrongswan-certexpire.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if USE_LED
|
||||
SUBDIRS += plugins/led
|
||||
if MONOLITHIC
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libhydra \
|
||||
-I$(top_srcdir)/src/libcharon
|
||||
|
||||
AM_CFLAGS = -rdynamic \
|
||||
-DIPSEC_PIDDIR=\"${piddir}\"
|
||||
|
||||
if MONOLITHIC
|
||||
noinst_LTLIBRARIES = libstrongswan-certexpire.la
|
||||
else
|
||||
plugin_LTLIBRARIES = libstrongswan-certexpire.la
|
||||
endif
|
||||
|
||||
libstrongswan_certexpire_la_SOURCES = certexpire_plugin.h certexpire_plugin.c
|
||||
|
||||
libstrongswan_certexpire_la_LDFLAGS = -module -avoid-version
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Martin Willi
|
||||
* Copyright (C) 2011 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 "certexpire_plugin.h"
|
||||
|
||||
#include <daemon.h>
|
||||
|
||||
typedef struct private_certexpire_plugin_t private_certexpire_plugin_t;
|
||||
|
||||
/**
|
||||
* Private data of certexpire plugin
|
||||
*/
|
||||
struct private_certexpire_plugin_t {
|
||||
|
||||
/**
|
||||
* Implements plugin interface
|
||||
*/
|
||||
certexpire_plugin_t public;
|
||||
};
|
||||
|
||||
METHOD(plugin_t, get_name, char*,
|
||||
private_certexpire_plugin_t *this)
|
||||
{
|
||||
return "certexpire";
|
||||
}
|
||||
|
||||
METHOD(plugin_t, destroy, void,
|
||||
private_certexpire_plugin_t *this)
|
||||
{
|
||||
free(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin constructor
|
||||
*/
|
||||
plugin_t *certexpire_plugin_create()
|
||||
{
|
||||
private_certexpire_plugin_t *this;
|
||||
|
||||
INIT(this,
|
||||
.public = {
|
||||
.plugin = {
|
||||
.get_name = _get_name,
|
||||
.reload = (void*)return_false,
|
||||
.destroy = _destroy,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
return &this->public.plugin;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2011 Martin Willi
|
||||
* Copyright (C) 2011 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 certexpire certexpire
|
||||
* @ingroup cplugins
|
||||
*
|
||||
* @defgroup certexpire_plugin certexpire_plugin
|
||||
* @{ @ingroup certexpire
|
||||
*/
|
||||
|
||||
#ifndef CERTEXPIRE_PLUGIN_H_
|
||||
#define CERTEXPIRE_PLUGIN_H_
|
||||
|
||||
#include <plugins/plugin.h>
|
||||
|
||||
typedef struct certexpire_plugin_t certexpire_plugin_t;
|
||||
|
||||
/**
|
||||
* Plugin exporting expiration dates of used certificates to CSV files.
|
||||
*/
|
||||
struct certexpire_plugin_t {
|
||||
|
||||
/**
|
||||
* Implements plugin interface.
|
||||
*/
|
||||
plugin_t plugin;
|
||||
};
|
||||
|
||||
#endif /** CERTEXPIRE_PLUGIN_H_ @}*/
|
||||
Reference in New Issue
Block a user