mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
openxpki: Register as OCSP responder
This commit is contained in:
parent
515cecfe3e
commit
efac611566
@ -46,19 +46,18 @@ static bool plugin_cb(private_openxpki_plugin_t *this,
|
|||||||
plugin_feature_t *feature, bool reg, void *cb_data)
|
plugin_feature_t *feature, bool reg, void *cb_data)
|
||||||
{
|
{
|
||||||
if (reg)
|
if (reg)
|
||||||
{
|
|
||||||
/* Is there already a registered OCSP responder? */
|
|
||||||
if (!lib->get(lib, "ocsp-responder"))
|
|
||||||
{
|
{
|
||||||
this->ocsp_responder = openxpki_ocsp_responder_create();
|
this->ocsp_responder = openxpki_ocsp_responder_create();
|
||||||
lib->set(lib, "ocsp-responder", this->ocsp_responder);
|
if (this->ocsp_responder)
|
||||||
|
{
|
||||||
|
lib->ocsp->add_responder(lib->ocsp, this->ocsp_responder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this->ocsp_responder)
|
if (this->ocsp_responder)
|
||||||
{
|
{
|
||||||
lib->set(lib, "ocsp-responder", NULL);
|
lib->ocsp->remove_responder(lib->ocsp, this->ocsp_responder);
|
||||||
this->ocsp_responder->destroy(this->ocsp_responder);
|
this->ocsp_responder->destroy(this->ocsp_responder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user