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

Function acmev2_req_init

modules/md/md_acme.c:228–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226/* ACME requests with nonce handling */
227
228static apr_status_t acmev2_req_init(md_acme_req_t *req, md_json_t *jpayload)
229{
230 md_data_t payload;
231
232 md_data_null(&payload);
233 if (!req->acme->acct) {
234 return APR_EINVAL;
235 }
236 if (jpayload) {
237 payload.data = md_json_writep(jpayload, req->p, MD_JSON_FMT_COMPACT);
238 if (!payload.data) {
239 return APR_EINVAL;
240 }
241 }
242 else {
243 payload.data = "";
244 }
245
246 payload.len = strlen(payload.data);
247 md_log_perror(MD_LOG_MARK, MD_LOG_TRACE1, 0, req->p,
248 "acme payload(len=%" APR_SIZE_T_FMT "): %s", payload.len, payload.data);
249 return md_jws_sign(&req->req_json, req->p, &payload,
250 req->prot_fields, req->acme->acct_key, req->acme->acct->url);
251}
252
253apr_status_t md_acme_req_body_init(md_acme_req_t *req, md_json_t *payload)
254{

Callers

nothing calls this directly

Calls 4

md_data_nullFunction · 0.85
md_json_writepFunction · 0.85
md_log_perrorFunction · 0.85
md_jws_signFunction · 0.85

Tested by

no test coverage detected