| 259 | |
| 260 | |
| 261 | static apr_status_t ocsp_status_save(md_ocsp_cert_stat_t stat, const md_data_t *resp_der, |
| 262 | const md_timeperiod_t *resp_valid, |
| 263 | md_ocsp_status_t *ostat, apr_pool_t *ptemp) |
| 264 | { |
| 265 | md_store_t *store = ostat->reg->store; |
| 266 | md_json_t *jprops; |
| 267 | apr_time_t mtime; |
| 268 | apr_status_t rv; |
| 269 | |
| 270 | jprops = md_json_create(ptemp); |
| 271 | ostat_to_json(jprops, stat, resp_der, resp_valid, ptemp); |
| 272 | rv = md_store_save_json(store, ptemp, MD_SG_OCSP, ostat->md_name, ostat->file_name, jprops, 0); |
| 273 | if (APR_SUCCESS != rv) goto cleanup; |
| 274 | mtime = md_store_get_modified(store, MD_SG_OCSP, ostat->md_name, ostat->file_name, ptemp); |
| 275 | if (mtime) ostat->resp_mtime = mtime; |
| 276 | cleanup: |
| 277 | return rv; |
| 278 | } |
| 279 | |
| 280 | static apr_status_t ocsp_reg_cleanup(void *data) |
| 281 | { |
no test coverage detected