sync CRLs if one in the cache is out of date

This commit is contained in:
dandds
2019-02-26 11:12:29 -05:00
parent b420ff2e5b
commit 22af868557
3 changed files with 145 additions and 97 deletions

View File

@@ -50,10 +50,10 @@ def make_app(config):
app.config.update({"SESSION_REDIS": app.redis})
make_flask_callbacks(app)
make_crl_validator(app)
register_filters(app)
make_eda_client(app)
make_csp_provider(app)
make_crl_validator(app)
make_mailer(app)
queue.init_app(app)
@@ -203,7 +203,10 @@ def make_crl_validator(app):
for filename in pathlib.Path(app.config["CRL_CONTAINER"]).glob("*.crl"):
crl_locations.append(filename.absolute())
app.crl_cache = CRLCache(
app.config["CA_CHAIN"], crl_locations, logger=app.logger
app.config["CA_CHAIN"],
crl_locations,
logger=app.logger,
crl_update_func=app.csp.crls.sync_crls,
)