| 177 | } |
| 178 | |
| 179 | static apr_status_t ostat_set(md_ocsp_status_t *ostat, md_ocsp_cert_stat_t stat, |
| 180 | md_data_t *der, md_timeperiod_t *valid, apr_time_t mtime) |
| 181 | { |
| 182 | apr_status_t rv; |
| 183 | |
| 184 | rv = md_data_assign_copy(&ostat->resp_der, der->data, der->len); |
| 185 | if (APR_SUCCESS != rv) goto cleanup; |
| 186 | |
| 187 | ostat->resp_stat = stat; |
| 188 | ostat->resp_valid = *valid; |
| 189 | ostat->resp_mtime = mtime; |
| 190 | |
| 191 | ostat->errors = 0; |
| 192 | ostat->next_run = md_timeperiod_slice_before_end( |
| 193 | &ostat->resp_valid, &ostat->reg->renew_window).start; |
| 194 | |
| 195 | cleanup: |
| 196 | return rv; |
| 197 | } |
| 198 | |
| 199 | static apr_status_t ostat_from_json(md_ocsp_cert_stat_t *pstat, |
| 200 | md_data_t *resp_der, md_timeperiod_t *resp_valid, |
no test coverage detected