Defer certificate loading until all PKCS#11 modules are loaded

This commit is contained in:
Martin Willi
2010-08-04 09:26:21 +02:00
parent 65858b83f8
commit 66267ea515
@@ -374,17 +374,22 @@ pkcs11_manager_t *pkcs11_manager_create(pkcs11_manager_token_event_t cb,
free(entry);
continue;
}
query_slots(entry);
this->libs->insert_last(this->libs, entry);
}
enumerator->destroy(enumerator);
singleton = this;
enumerator = this->libs->create_enumerator(this->libs);
while (enumerator->enumerate(enumerator, &entry))
{
query_slots(entry);
entry->job = callback_job_create((void*)dispatch_slot_events,
entry, (void*)end_dispatch, NULL);
charon->processor->queue_job(charon->processor, (job_t*)entry->job);
}
enumerator->destroy(enumerator);
singleton = this;
return &this->public;
}