/* Licensed to the Apache Software Foundation (ASF) under one or more *contributorlicenseagreements.SeetheNOTICEfiledistributedwith *thisworkforadditionalinformationregardingcopyrightownership. *TheASFlicensesthisfiletoYouundertheApacheLicense,Version2.0 *(the"License");youmaynotusethisfileexceptincompliancewith *theLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting,software *distributedundertheLicenseisdistributedonan"ASIS"BASIS, *WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied. *SeetheLicenseforthespecificlanguagegoverningpermissionsand *limitationsundertheLicense.
*/
/* _ _ *___________||______||mod_ssl *|'_`_\/_\/_`|/__/__||ApacheInterfacetoOpenSSL *||||||(_)|(_||\__\__\| *|_||_||_|\___/\__,_|___|___/___/_| *|_____| *ssl_util.c *UtilityFunctions
*/ /* ``Every day of my life Iamforcedtoaddanother nametothelistofpeople whopissmeoff!''
-- Calvin */
/* check ServerName */ if (!strcasecmp(servername, s->server_hostname)) { returnTRUE;
}
/* *ifnotmatchedyet,checkServerAliasentries *(adaptedfromvhost.c:matches_aliases())
*/
names = s->names; if (names) { char **name = (char **)names->elts; for (i = 0; i < names->nelts; ++i) { if (!name[i]) continue; if (!strcasecmp(servername, name[i])) { returnTRUE;
}
}
}
/* if still no match, check ServerAlias entries with wildcards */
names = s->wild_names; if (names) { char **name = (char **)names->elts; for (i = 0; i < names->nelts; ++i) { if (!name[i]) continue; if (!ap_strcasecmp_match(servername, name[i])) { returnTRUE;
}
}
}
value = apr_palloc(p, sizeof(struct CRYPTO_dynlock_value));
value->pool = p; /* Keep our own copy of the place from which we were created,
using our own pool. */
value->file = apr_pstrdup(p, file);
value->line = line;
rv = apr_thread_mutex_create(&(value->mutex), APR_THREAD_MUTEX_DEFAULT,
p); if (rv != APR_SUCCESS) {
ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, rv, p, APLOGNO(02186) "Failed to create thread mutex for dynamic lock");
apr_pool_destroy(p); return NULL;
} return value;
}
/* Trust that whomever owned the CRYPTO_dynlock_value we were *passedhasnofutureuseforit...
*/
apr_pool_destroy(l->pool);
}
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
staticvoid ssl_util_thr_id(CRYPTO_THREADID *id)
{ /* OpenSSL needs this to return an unsigned long. On OS/390, the pthread *idisastructuretwicethatbig.UsetheTCBpointerinsteadasa *uniqueunsignedlong.
*/ #ifdef __MVS__ struct PSA { char unmapped[540]; /* PSATOLD is at offset 540 in the PSA */ unsignedlong PSATOLD;
} *psaptr = 0; /* PSA is at address 0 */
for (i = 0; i < lock_num_locks; i++) {
apr_thread_mutex_create(&(lock_cs[i]), APR_THREAD_MUTEX_DEFAULT, p);
}
CRYPTO_set_locking_callback(ssl_util_thr_lock);
/* Set up dynamic locking scaffolding for OpenSSL to use at its *convenience.
*/
dynlockpool = p;
CRYPTO_set_dynlock_create_callback(ssl_dyn_create_function);
CRYPTO_set_dynlock_lock_callback(ssl_dyn_lock_function);
CRYPTO_set_dynlock_destroy_callback(ssl_dyn_destroy_function);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.