implemented pkcs1 private/public key encoding and fingerprinting
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <library.h>
|
||||
#include "pkcs1_builder.h"
|
||||
#include "pkcs1_encoder.h"
|
||||
|
||||
typedef struct private_pkcs1_plugin_t private_pkcs1_plugin_t;
|
||||
|
||||
@@ -40,6 +41,9 @@ static void destroy(private_pkcs1_plugin_t *this)
|
||||
(builder_constructor_t)pkcs1_public_key_builder);
|
||||
lib->creds->remove_builder(lib->creds,
|
||||
(builder_constructor_t)pkcs1_private_key_builder);
|
||||
|
||||
lib->encoding->remove_encoder(lib->encoding, pkcs1_encoder_encode);
|
||||
|
||||
free(this);
|
||||
}
|
||||
|
||||
@@ -59,6 +63,8 @@ plugin_t *plugin_create()
|
||||
lib->creds->add_builder(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,
|
||||
(builder_constructor_t)pkcs1_private_key_builder);
|
||||
|
||||
lib->encoding->add_encoder(lib->encoding, pkcs1_encoder_encode);
|
||||
|
||||
return &this->public.plugin;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user