Destroy IKE_SA Managers crypto primitives during flush, the plugins are gone in destroy

This commit is contained in:
Martin Willi
2010-08-04 09:26:21 +02:00
parent 5a27bf8ad8
commit 65858b83f8
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -1613,6 +1613,9 @@ static void flush(private_ike_sa_manager_t *this)
enumerator->destroy(enumerator);
charon->bus->set_sa(charon->bus, NULL);
unlock_all_segments(this);
this->rng->destroy(this->rng);
this->hasher->destroy(this->hasher);
}
/**
@@ -1652,8 +1655,6 @@ static void destroy(private_ike_sa_manager_t *this)
free(this->half_open_segments);
free(this->connected_peers_segments);
this->rng->destroy(this->rng);
this->hasher->destroy(this->hasher);
free(this);
}
+2
View File
@@ -199,6 +199,8 @@ struct ike_sa_manager_t {
* Delete all existing IKE_SAs and destroy them immediately.
*
* Threads will be driven out, so all SAs can be deleted cleanly.
* To a flush(), an immediate call to destroy() is mandatory; no other
* method may be used.
*/
void (*flush)(ike_sa_manager_t *this);