generic public key factory moved
This commit is contained in:
@@ -8,8 +8,8 @@ plugin_LTLIBRARIES = libstrongswan-gmp.la
|
||||
libstrongswan_gmp_la_SOURCES = gmp_plugin.h gmp_plugin.c \
|
||||
gmp_diffie_hellman.c gmp_diffie_hellman.h \
|
||||
gmp_rsa_private_key.c gmp_rsa_private_key.h \
|
||||
gmp_rsa_public_key.c gmp_rsa_public_key.h \
|
||||
gmp_public_key.c gmp_public_key.h
|
||||
gmp_rsa_public_key.c gmp_rsa_public_key.h
|
||||
|
||||
libstrongswan_gmp_la_LDFLAGS = -module
|
||||
libstrongswan_gmp_la_LIBADD = -lgmp
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <library.h>
|
||||
#include "gmp_diffie_hellman.h"
|
||||
#include "gmp_public_key.h"
|
||||
#include "gmp_rsa_private_key.h"
|
||||
#include "gmp_rsa_public_key.h"
|
||||
|
||||
@@ -82,8 +81,6 @@ plugin_t *plugin_create()
|
||||
(builder_constructor_t)gmp_rsa_private_key_builder);
|
||||
lib->creds->add_builder(lib->creds, CRED_PUBLIC_KEY, KEY_RSA,
|
||||
(builder_constructor_t)gmp_rsa_public_key_builder);
|
||||
lib->creds->add_builder(lib->creds, CRED_PUBLIC_KEY, KEY_ANY,
|
||||
(builder_constructor_t)gmp_public_key_builder);
|
||||
|
||||
return &this->public.plugin;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ AM_CFLAGS = -rdynamic
|
||||
plugin_LTLIBRARIES = libstrongswan-pubkey.la
|
||||
|
||||
libstrongswan_pubkey_la_SOURCES = pubkey_plugin.h pubkey_plugin.c \
|
||||
pubkey_cert.h pubkey_cert.c
|
||||
pubkey_cert.h pubkey_cert.c\
|
||||
pubkey_public_key.h pubkey_public_key.c
|
||||
|
||||
libstrongswan_pubkey_la_LDFLAGS = -module
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <library.h>
|
||||
#include "pubkey_cert.h"
|
||||
#include "pubkey_public_key.h"
|
||||
|
||||
typedef struct private_pubkey_plugin_t private_pubkey_plugin_t;
|
||||
|
||||
@@ -54,6 +55,8 @@ plugin_t *plugin_create()
|
||||
|
||||
lib->creds->add_builder(lib->creds, CRED_CERTIFICATE, CERT_TRUSTED_PUBKEY,
|
||||
(builder_constructor_t)pubkey_cert_builder);
|
||||
lib->creds->add_builder(lib->creds, CRED_PUBLIC_KEY, KEY_ANY,
|
||||
(builder_constructor_t)pubkey_public_key_builder);
|
||||
|
||||
return &this->public.plugin;
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "gmp_public_key.h"
|
||||
#include "pubkey_public_key.h"
|
||||
|
||||
#include <debug.h>
|
||||
#include <asn1/oid.h>
|
||||
@@ -140,7 +140,7 @@ static void add(private_builder_t *this, builder_part_t part, ...)
|
||||
/**
|
||||
* Builder construction function
|
||||
*/
|
||||
builder_t *gmp_public_key_builder(key_type_t type)
|
||||
builder_t *pubkey_public_key_builder(key_type_t type)
|
||||
{
|
||||
private_builder_t *this;
|
||||
|
||||
+6
-6
@@ -16,12 +16,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup gmp_public_key gmp_public_key
|
||||
* @{ @ingroup gmp_p
|
||||
* @defgroup pubkey_public_key pubkey_public_key
|
||||
* @{ @ingroup pubkey_p
|
||||
*/
|
||||
|
||||
#ifndef GMP_PUBLIC_KEY_H_
|
||||
#define GMP_PUBLIC_KEY_H_
|
||||
#ifndef PUBKEY_PUBLIC_KEY_H_
|
||||
#define PUBKEY_PUBLIC_KEY_H_
|
||||
|
||||
#include <credentials/keys/public_key.h>
|
||||
|
||||
@@ -31,6 +31,6 @@
|
||||
* @param type type of the key, must be KEY_ANY
|
||||
* @return builder instance
|
||||
*/
|
||||
builder_t *gmp_public_key_builder(key_type_t type);
|
||||
builder_t *pubkey_public_key_builder(key_type_t type);
|
||||
|
||||
#endif /*GMP_RSA_PUBLIC_KEY_H_ @}*/
|
||||
#endif /*PUBKEY_RSA_PUBLIC_KEY_H_ @}*/
|
||||
Reference in New Issue
Block a user