MCPcopy Create free account
hub / github.com/apache/httpd / cha_from_json

Function cha_from_json

modules/md/md_acme_authz.c:175–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173/* response to a challenge */
174
175static md_acme_authz_cha_t *cha_from_json(apr_pool_t *p, size_t index, md_json_t *json)
176{
177 md_acme_authz_cha_t * cha;
178
179 cha = apr_pcalloc(p, sizeof(*cha));
180 cha->index = index;
181 cha->type = md_json_dups(p, json, MD_KEY_TYPE, NULL);
182 if (md_json_has_key(json, MD_KEY_URL, NULL)) { /* ACMEv2 */
183 cha->uri = md_json_dups(p, json, MD_KEY_URL, NULL);
184 }
185 else { /* ACMEv1 */
186 cha->uri = md_json_dups(p, json, MD_KEY_URI, NULL);
187 }
188 cha->token = md_json_dups(p, json, MD_KEY_TOKEN, NULL);
189 cha->key_authz = md_json_dups(p, json, MD_KEY_KEYAUTHZ, NULL);
190
191 return cha;
192}
193
194static apr_status_t on_init_authz_resp(md_acme_req_t *req, void *baton)
195{

Callers 1

find_typeFunction · 0.85

Calls 2

md_json_dupsFunction · 0.85
md_json_has_keyFunction · 0.85

Tested by

no test coverage detected