| 397 | } |
| 398 | |
| 399 | static apr_status_t await_valid(void *baton, int attempt) |
| 400 | { |
| 401 | order_ctx_t *ctx = baton; |
| 402 | apr_status_t rv = APR_SUCCESS; |
| 403 | |
| 404 | (void)attempt; |
| 405 | if (APR_SUCCESS != (rv = md_acme_order_update(ctx->order, ctx->acme, |
| 406 | ctx->result, ctx->p))) goto out; |
| 407 | switch (ctx->order->status) { |
| 408 | case MD_ACME_ORDER_ST_VALID: |
| 409 | md_result_set(ctx->result, APR_EINVAL, "ACME server order status is 'valid'."); |
| 410 | break; |
| 411 | case MD_ACME_ORDER_ST_PROCESSING: |
| 412 | rv = APR_EAGAIN; |
| 413 | break; |
| 414 | case MD_ACME_ORDER_ST_INVALID: |
| 415 | md_result_set(ctx->result, APR_EINVAL, "ACME server order status is 'invalid'."); |
| 416 | rv = APR_EINVAL; |
| 417 | break; |
| 418 | default: |
| 419 | rv = APR_EINVAL; |
| 420 | break; |
| 421 | } |
| 422 | out: |
| 423 | return rv; |
| 424 | } |
| 425 | |
| 426 | apr_status_t md_acme_order_await_valid(md_acme_order_t *order, md_acme_t *acme, |
| 427 | const md_t *md, apr_interval_time_t timeout, |
nothing calls this directly
no test coverage detected