diff options
Diffstat (limited to 'src/libstrongswan/plugins/pgp')
-rw-r--r-- | src/libstrongswan/plugins/pgp/pgp_cert.c | 2 | ||||
-rw-r--r-- | src/libstrongswan/plugins/pgp/pgp_cert.h | 2 | ||||
-rw-r--r-- | src/libstrongswan/plugins/pgp/pgp_plugin.c | 7 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/pgp/pgp_cert.c b/src/libstrongswan/plugins/pgp/pgp_cert.c index f9a2ff3c7..d289a3b86 100644 --- a/src/libstrongswan/plugins/pgp/pgp_cert.c +++ b/src/libstrongswan/plugins/pgp/pgp_cert.c @@ -347,7 +347,7 @@ static bool parse_user_id(private_pgp_cert_t *this, chunk_t packet) /** * See header. */ -pgp_cert_t *pgp_cert_load(certificate_t type, va_list args) +pgp_cert_t *pgp_cert_load(certificate_type_t type, va_list args) { chunk_t packet, blob = chunk_empty; pgp_packet_tag_t tag; diff --git a/src/libstrongswan/plugins/pgp/pgp_cert.h b/src/libstrongswan/plugins/pgp/pgp_cert.h index b6411557f..7845e8f04 100644 --- a/src/libstrongswan/plugins/pgp/pgp_cert.h +++ b/src/libstrongswan/plugins/pgp/pgp_cert.h @@ -43,6 +43,6 @@ struct pgp_cert_t { * @param args builder_part_t argument list * @return builder instance */ -pgp_cert_t *pgp_cert_load(certificate_t type, va_list args); +pgp_cert_t *pgp_cert_load(certificate_type_t type, va_list args); #endif /* PGP_CERT_ @}*/ diff --git a/src/libstrongswan/plugins/pgp/pgp_plugin.c b/src/libstrongswan/plugins/pgp/pgp_plugin.c index 198b58cbf..eabb3695f 100644 --- a/src/libstrongswan/plugins/pgp/pgp_plugin.c +++ b/src/libstrongswan/plugins/pgp/pgp_plugin.c @@ -18,6 +18,7 @@ #include <library.h> #include "pgp_builder.h" #include "pgp_encoder.h" +#include "pgp_cert.h" typedef struct private_pgp_plugin_t private_pgp_plugin_t; @@ -42,6 +43,9 @@ static void destroy(private_pgp_plugin_t *this) lib->creds->remove_builder(lib->creds, (builder_function_t)pgp_private_key_load); + lib->creds->remove_builder(lib->creds, + (builder_function_t)pgp_cert_load); + lib->encoding->remove_encoder(lib->encoding, pgp_encoder_encode); free(this); @@ -65,6 +69,9 @@ plugin_t *plugin_create() lib->creds->add_builder(lib->creds, CRED_PRIVATE_KEY, KEY_RSA, (builder_function_t)pgp_private_key_load); + lib->creds->add_builder(lib->creds, CRED_CERTIFICATE, CERT_GPG, + (builder_function_t)pgp_cert_load); + lib->encoding->add_encoder(lib->encoding, pgp_encoder_encode); return &this->public.plugin; |