aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/credentials
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-03-31 08:43:18 +0000
committerMartin Willi <martin@strongswan.org>2008-03-31 08:43:18 +0000
commit0f7ef3d2a0f0183a5a335c0a69275a526cea711d (patch)
treece5b9cb8251410742b8f92070c708a110758e043 /src/charon/credentials
parentd69b267d58581684b8e3013581c7d77db794d9f1 (diff)
downloadstrongswan-0f7ef3d2a0f0183a5a335c0a69275a526cea711d.tar.bz2
strongswan-0f7ef3d2a0f0183a5a335c0a69275a526cea711d.tar.xz
received certificates have least priority
fixed manager unlocking
Diffstat (limited to 'src/charon/credentials')
-rw-r--r--src/charon/credentials/credential_manager.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/charon/credentials/credential_manager.c b/src/charon/credentials/credential_manager.c
index d8381afd4..f34ba38bc 100644
--- a/src/charon/credentials/credential_manager.c
+++ b/src/charon/credentials/credential_manager.c
@@ -366,9 +366,7 @@ static bool verify_ocsp(private_credential_manager_t *this,
bool verified = FALSE;
wrapper = ocsp_response_wrapper_create((ocsp_response_t*)response);
- this->sets->remove(this->sets, this->cache, NULL);
- this->sets->insert_first(this->sets, wrapper);
- this->sets->insert_first(this->sets, this->cache);
+ this->sets->insert_last(this->sets, wrapper);
subject = &response->certificate;
responder = subject->get_issuer(subject);
@@ -1106,14 +1104,14 @@ static bool public_enumerate(public_enumerator_t *this,
*/
static void public_destroy(public_enumerator_t *this)
{
+ DESTROY_IF(this->current);
+ this->inner->destroy(this->inner);
if (this->wrapper)
{
this->this->sets->remove(this->this->sets, this->wrapper, NULL);
- this->this->mutex->unlock(this->this->mutex);
this->wrapper->destroy(this->wrapper);
}
- DESTROY_IF(this->current);
- this->inner->destroy(this->inner);
+ this->this->mutex->unlock(this->this->mutex);
free(this);
}
@@ -1135,9 +1133,7 @@ static enumerator_t* create_public_enumerator(private_credential_manager_t *this
if (auth)
{
enumerator->wrapper = auth_info_wrapper_create(auth);
- this->sets->remove(this->sets, this->cache, NULL);
- this->sets->insert_first(this->sets, enumerator->wrapper);
- this->sets->insert_first(this->sets, this->cache);
+ this->sets->insert_last(this->sets, enumerator->wrapper);
}
return &enumerator->public;
}