MCPcopy Create free account
hub / github.com/apache/httpd / ocsp_status_refresh

Function ocsp_status_refresh

modules/md/md_ocsp.c:238–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238static apr_status_t ocsp_status_refresh(md_ocsp_status_t *ostat, apr_pool_t *ptemp)
239{
240 md_store_t *store = ostat->reg->store;
241 md_json_t *jprops;
242 apr_time_t mtime;
243 apr_status_t rv = APR_EAGAIN;
244 md_data_t resp_der;
245 md_timeperiod_t resp_valid;
246 md_ocsp_cert_stat_t resp_stat;
247 /* Check if the store holds a newer response than the one we have */
248 mtime = md_store_get_modified(store, MD_SG_OCSP, ostat->md_name, ostat->file_name, ptemp);
249 if (mtime <= ostat->resp_mtime) goto cleanup;
250 rv = md_store_load_json(store, MD_SG_OCSP, ostat->md_name, ostat->file_name, &jprops, ptemp);
251 if (APR_SUCCESS != rv) goto cleanup;
252 rv = ostat_from_json(&resp_stat, &resp_der, &resp_valid, jprops, ptemp);
253 if (APR_SUCCESS != rv) goto cleanup;
254 rv = ostat_set(ostat, resp_stat, &resp_der, &resp_valid, mtime);
255 if (APR_SUCCESS != rv) goto cleanup;
256cleanup:
257 return rv;
258}
259
260
261static apr_status_t ocsp_status_save(md_ocsp_cert_stat_t stat, const md_data_t *resp_der,

Callers 3

md_ocsp_primeFunction · 0.85
md_ocsp_get_statusFunction · 0.85
ocsp_get_metaFunction · 0.85

Calls 4

md_store_get_modifiedFunction · 0.85
md_store_load_jsonFunction · 0.85
ostat_from_jsonFunction · 0.85
ostat_setFunction · 0.85

Tested by

no test coverage detected