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

Function acme_driver_preload_init

modules/md/md_acme_drive.c:505–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503/* ACME driver init */
504
505static apr_status_t acme_driver_preload_init(md_proto_driver_t *d, md_result_t *result)
506{
507 md_acme_driver_t *ad;
508 md_credentials_t *cred;
509 int i;
510
511 md_result_set(result, APR_SUCCESS, NULL);
512
513 ad = apr_pcalloc(d->p, sizeof(*ad));
514
515 d->baton = ad;
516
517 ad->driver = d;
518 ad->authz_monitor_timeout = apr_time_from_sec(300);
519 ad->cert_poll_timeout = apr_time_from_sec(300);
520 ad->ca_challenges = apr_array_make(d->p, 3, sizeof(const char*));
521
522 /* We want to obtain credentials (key+certificate) for every key spec in this MD */
523 ad->creds = apr_array_make(d->p, md_pkeys_spec_count(d->md->pks), sizeof(md_credentials_t*));
524 for (i = 0; i < md_pkeys_spec_count(d->md->pks); ++i) {
525 cred = apr_pcalloc(d->p, sizeof(*cred));
526 cred->spec = md_pkeys_spec_get(d->md->pks, i);
527 cred->chain = apr_array_make(d->p, 5, sizeof(md_cert_t*));
528 APR_ARRAY_PUSH(ad->creds, md_credentials_t*) = cred;
529 }
530
531 md_log_perror(MD_LOG_MARK, MD_LOG_TRACE1, result->status, d->p,
532 "%s: init_base driver", d->md->name);
533 return result->status;
534}
535
536static apr_status_t acme_driver_init(md_proto_driver_t *d, md_result_t *result)
537{

Callers 1

acme_driver_initFunction · 0.85

Calls 4

md_result_setFunction · 0.85
md_pkeys_spec_countFunction · 0.85
md_pkeys_spec_getFunction · 0.85
md_log_perrorFunction · 0.85

Tested by

no test coverage detected