diff options
author | Martin Willi <martin@strongswan.org> | 2009-06-04 14:23:39 +0200 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-06-09 11:18:56 +0200 |
commit | 4977018c23a93469296891e65bd2d3c33eeb5511 (patch) | |
tree | 27d1a110a27ac22ab2b070703966823eb1ccc630 /src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c | |
parent | 86ab0bb65e52e140341f25e23f4ef24dc6bde9ca (diff) | |
download | strongswan-4977018c23a93469296891e65bd2d3c33eeb5511.tar.bz2 strongswan-4977018c23a93469296891e65bd2d3c33eeb5511.tar.xz |
added skeleton for libgcrypt based crypto plugin
Diffstat (limited to 'src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c')
-rw-r--r-- | src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c b/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c new file mode 100644 index 000000000..1b3c66d1d --- /dev/null +++ b/src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2009 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. + */ + +#include "gcrypt_plugin.h" + +#include <library.h> + +typedef struct private_gcrypt_plugin_t private_gcrypt_plugin_t; + +/** + * private data of gcrypt_plugin + */ +struct private_gcrypt_plugin_t { + + /** + * public functions + */ + gcrypt_plugin_t public; +}; + +/** + * Implementation of gcrypt_plugin_t.destroy + */ +static void destroy(private_gcrypt_plugin_t *this) +{ + free(this); +} + +/* + * see header file + */ +plugin_t *plugin_create() +{ + private_gcrypt_plugin_t *this = malloc_thing(private_gcrypt_plugin_t); + + this->public.plugin.destroy = (void(*)(plugin_t*))destroy; + + return &this->public.plugin; +} + |