| 118 | } |
| 119 | |
| 120 | static void order_update_from_json(md_acme_order_t *order, md_json_t *json, apr_pool_t *p) |
| 121 | { |
| 122 | if (!order->url && md_json_has_key(json, MD_KEY_URL, NULL)) { |
| 123 | order->url = md_json_dups(p, json, MD_KEY_URL, NULL); |
| 124 | } |
| 125 | order->status = order_st_from_str(md_json_gets(json, MD_KEY_STATUS, NULL)); |
| 126 | if (md_json_has_key(json, MD_KEY_AUTHORIZATIONS, NULL)) { |
| 127 | md_json_dupsa(order->authz_urls, p, json, MD_KEY_AUTHORIZATIONS, NULL); |
| 128 | } |
| 129 | if (md_json_has_key(json, MD_KEY_CHALLENGE_SETUPS, NULL)) { |
| 130 | md_json_dupsa(order->challenge_setups, p, json, MD_KEY_CHALLENGE_SETUPS, NULL); |
| 131 | } |
| 132 | if (md_json_has_key(json, MD_KEY_FINALIZE, NULL)) { |
| 133 | order->finalize = md_json_dups(p, json, MD_KEY_FINALIZE, NULL); |
| 134 | } |
| 135 | if (md_json_has_key(json, MD_KEY_CERTIFICATE, NULL)) { |
| 136 | order->certificate = md_json_dups(p, json, MD_KEY_CERTIFICATE, NULL); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | md_acme_order_t *md_acme_order_from_json(md_json_t *json, apr_pool_t *p) |
| 141 | { |
no test coverage detected