diff options
author | Martin Willi <martin@strongswan.org> | 2008-05-08 13:16:42 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-05-08 13:16:42 +0000 |
commit | affd7a90bade50f5194ef730ecf3a7810cecac5a (patch) | |
tree | c2ea43b535b80e48e601b6814aabec43b8c9fcfe /src/charon/plugins/medsrv/medsrv_creds.c | |
parent | 0395eb7c081e6249fac5790e6f3abfe5ad9b4e79 (diff) | |
download | strongswan-affd7a90bade50f5194ef730ecf3a7810cecac5a.tar.bz2 strongswan-affd7a90bade50f5194ef730ecf3a7810cecac5a.tar.xz |
moved RAW public key support to a separate plugin (pubkey)
Diffstat (limited to 'src/charon/plugins/medsrv/medsrv_creds.c')
-rw-r--r-- | src/charon/plugins/medsrv/medsrv_creds.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/charon/plugins/medsrv/medsrv_creds.c b/src/charon/plugins/medsrv/medsrv_creds.c index b87ef062b..428907628 100644 --- a/src/charon/plugins/medsrv/medsrv_creds.c +++ b/src/charon/plugins/medsrv/medsrv_creds.c @@ -16,7 +16,6 @@ */ #include "medsrv_creds.h" -#include "medsrv_pubkey.h" #include <daemon.h> #include <library.h> @@ -60,6 +59,7 @@ typedef struct { static bool cert_enumerator_enumerate(cert_enumerator_t *this, certificate_t **cert) { + certificate_t *trusted; public_key_t *public; chunk_t chunk; @@ -73,8 +73,15 @@ static bool cert_enumerator_enumerate(cert_enumerator_t *this, { if (this->type == KEY_ANY || this->type == public->get_type(public)) { - *cert = this->current = (certificate_t*)medsrv_pubkey_create(public); - return TRUE; + trusted = lib->creds->create(lib->creds, + CRED_CERTIFICATE, CERT_TRUSTED_PUBKEY, + BUILD_PUBLIC_KEY, public, BUILD_END); + if (trusted) + { + *cert = this->current = trusted; + return TRUE; + } + continue; } public->destroy(public); } |