| 1295 | } |
| 1296 | |
| 1297 | int md_cert_covers_md(md_cert_t *cert, const md_t *md) |
| 1298 | { |
| 1299 | const char *name; |
| 1300 | int i; |
| 1301 | |
| 1302 | if (!cert->alt_names) { |
| 1303 | md_cert_get_alt_names(&cert->alt_names, cert, cert->pool); |
| 1304 | } |
| 1305 | if (cert->alt_names) { |
| 1306 | md_log_perror(MD_LOG_MARK, MD_LOG_TRACE4, 0, cert->pool, "cert has %d alt names", |
| 1307 | cert->alt_names->nelts); |
| 1308 | for (i = 0; i < md->domains->nelts; ++i) { |
| 1309 | name = APR_ARRAY_IDX(md->domains, i, const char *); |
| 1310 | if (!md_dns_domains_match(cert->alt_names, name)) { |
| 1311 | md_log_perror(MD_LOG_MARK, MD_LOG_TRACE1, 0, cert->pool, |
| 1312 | "md domain %s not covered by cert", name); |
| 1313 | return 0; |
| 1314 | } |
| 1315 | } |
| 1316 | return 1; |
| 1317 | } |
| 1318 | else { |
| 1319 | md_log_perror(MD_LOG_MARK, MD_LOG_WARNING, 0, cert->pool, "cert has NO alt names"); |
| 1320 | } |
| 1321 | return 0; |
| 1322 | } |
| 1323 | |
| 1324 | const char *md_cert_get_issuer_name(const md_cert_t *cert, apr_pool_t *p) |
| 1325 | { |
nothing calls this directly
no test coverage detected