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

Function modssl_ctx_cfg_merge_certkeys_array

modules/ssl/ssl_engine_config.c:336–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336static void modssl_ctx_cfg_merge_certkeys_array(apr_pool_t *p,
337 apr_array_header_t *base,
338 apr_array_header_t *add,
339 apr_array_header_t *mrg)
340{
341 int i;
342
343 /*
344 * pick up to CERTKEYS_IDX_MAX+1 entries from "add" (in which case they
345 * they "knock out" their corresponding entries in "base", emulating
346 * the behavior with cfgMergeString in releases up to 2.4.7)
347 */
348 for (i = 0; i < add->nelts && i <= CERTKEYS_IDX_MAX; i++) {
349 APR_ARRAY_PUSH(mrg, const char *) = APR_ARRAY_IDX(add, i, const char *);
350 }
351
352 /* add remaining ones from "base" */
353 while (i < base->nelts) {
354 APR_ARRAY_PUSH(mrg, const char *) = APR_ARRAY_IDX(base, i, const char *);
355 i++;
356 }
357
358 /* and finally, append the rest of "add" (if there are any) */
359 for (i = CERTKEYS_IDX_MAX+1; i < add->nelts; i++) {
360 APR_ARRAY_PUSH(mrg, const char *) = APR_ARRAY_IDX(add, i, const char *);
361 }
362}
363
364static void modssl_ctx_cfg_merge_server(apr_pool_t *p,
365 modssl_ctx_t *base,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected