| 128 | } |
| 129 | |
| 130 | static md_acme_req_t *md_acme_req_create(md_acme_t *acme, const char *method, const char *url) |
| 131 | { |
| 132 | apr_pool_t *pool; |
| 133 | md_acme_req_t *req; |
| 134 | apr_status_t rv; |
| 135 | |
| 136 | rv = apr_pool_create(&pool, acme->p); |
| 137 | if (rv != APR_SUCCESS) { |
| 138 | return NULL; |
| 139 | } |
| 140 | apr_pool_tag(pool, "md_acme_req"); |
| 141 | |
| 142 | req = apr_pcalloc(pool, sizeof(*req)); |
| 143 | if (!req) { |
| 144 | apr_pool_destroy(pool); |
| 145 | return NULL; |
| 146 | } |
| 147 | |
| 148 | req->acme = acme; |
| 149 | req->p = pool; |
| 150 | req->method = method; |
| 151 | req->url = url; |
| 152 | req->prot_fields = md_json_create(pool); |
| 153 | req->max_retries = acme->max_retries; |
| 154 | req->result = md_result_make(req->p, APR_SUCCESS); |
| 155 | return req; |
| 156 | } |
| 157 | |
| 158 | static apr_status_t acmev2_new_nonce(md_acme_t *acme) |
| 159 | { |
no test coverage detected