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

Function md_job_json_seems_valid

modules/md/md_status.c:100–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100static int md_job_json_seems_valid(md_json_t *json, md_store_t *store,
101 md_store_group_t group, const char *name,
102 apr_pool_t *p)
103{
104
105 if (!json) return FALSE;
106 if ((group == MD_SG_STAGING) &&
107 md_json_getb(json, MD_KEY_FINISHED, NULL) &&
108 md_json_getb(json, MD_KEY_NOTIFIED_RENEWED, NULL)) {
109 md_t *md;
110 /* A finished job in the staging area needs to have produced results */
111 if(!md_exists(store, group, name, p)) return FALSE;
112
113 if (APR_SUCCESS == md_load(store, MD_SG_DOMAINS, name, &md, p)) {
114 int i;
115 for (i = 0; i < md_cert_count(md); ++i) {
116 md_pkey_spec_t *spec = md_pkeys_spec_get(md->pks, i);
117 if(md_pubcert_load(store, group, name, spec, NULL, p) != APR_SUCCESS)
118 return FALSE;
119 }
120 }
121 }
122 return TRUE;
123}
124
125static apr_status_t job_loadj(md_json_t **pjson, md_store_group_t group, const char *name,
126 struct md_reg_t *reg, int with_log, apr_pool_t *p)

Callers 2

job_loadjFunction · 0.85
md_job_loadFunction · 0.85

Calls 6

md_json_getbFunction · 0.85
md_existsFunction · 0.85
md_loadFunction · 0.85
md_cert_countFunction · 0.85
md_pkeys_spec_getFunction · 0.85
md_pubcert_loadFunction · 0.85

Tested by

no test coverage detected