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

Function ssl_init_ca_cert_path

modules/ssl/ssl_engine_init.c:2388–2420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2386}
2387
2388static apr_status_t ssl_init_ca_cert_path(server_rec *s,
2389 apr_pool_t *ptemp,
2390 const char *path,
2391 STACK_OF(X509_NAME) *ca_list,
2392 STACK_OF(X509_INFO) *xi_list)
2393{
2394 apr_dir_t *dir;
2395 apr_finfo_t direntry;
2396 apr_int32_t finfo_flags = APR_FINFO_TYPE|APR_FINFO_NAME;
2397
2398 if (!path || (!ca_list && !xi_list) ||
2399 (apr_dir_open(&dir, path, ptemp) != APR_SUCCESS)) {
2400 return APR_EGENERAL;
2401 }
2402
2403 while ((apr_dir_read(&direntry, finfo_flags, dir)) == APR_SUCCESS) {
2404 const char *file;
2405 if (direntry.filetype == APR_DIR) {
2406 continue; /* don't try to load directories */
2407 }
2408 file = apr_pstrcat(ptemp, path, "/", direntry.name, NULL);
2409 if (ca_list) {
2410 SSL_add_file_cert_subjects_to_stack(ca_list, file);
2411 }
2412 if (xi_list) {
2413 load_x509_info(ptemp, xi_list, file);
2414 }
2415 }
2416
2417 apr_dir_close(dir);
2418
2419 return APR_SUCCESS;
2420}
2421
2422STACK_OF(X509_NAME) *ssl_init_FindCAList(server_rec *s,
2423 apr_pool_t *ptemp,

Callers 2

ssl_init_proxy_certsFunction · 0.85
ssl_init_FindCAListFunction · 0.85

Calls 1

load_x509_infoFunction · 0.85

Tested by

no test coverage detected