mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
mod_ssl: follow up to r1734561.
Simplify CRL check mode and flags handling/merging by using a single mask (int). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735337 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -229,13 +229,6 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
|
||||
sc->fips = FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (sc->server && sc->server->crl_check_flags == UNSET) {
|
||||
sc->server->crl_check_flags = 0;
|
||||
}
|
||||
if (sc->proxy && sc->proxy->crl_check_flags == UNSET) {
|
||||
sc->proxy->crl_check_flags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#if APR_HAS_THREADS
|
||||
@@ -818,14 +811,15 @@ static apr_status_t ssl_init_ctx_crl(server_rec *s,
|
||||
X509_STORE *store = SSL_CTX_get_cert_store(mctx->ssl_ctx);
|
||||
unsigned long crlflags = 0;
|
||||
char *cfgp = mctx->pkp ? "SSLProxy" : "SSL";
|
||||
int crl_check_mode = mctx->crl_check_mask & ~SSL_CRLCHECK_FLAGS;
|
||||
|
||||
/*
|
||||
* Configure Certificate Revocation List (CRL) Details
|
||||
*/
|
||||
|
||||
if (!(mctx->crl_file || mctx->crl_path)) {
|
||||
if (mctx->crl_check_mode == SSL_CRLCHECK_LEAF ||
|
||||
mctx->crl_check_mode == SSL_CRLCHECK_CHAIN) {
|
||||
if (crl_check_mode == SSL_CRLCHECK_LEAF ||
|
||||
crl_check_mode == SSL_CRLCHECK_CHAIN) {
|
||||
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01899)
|
||||
"Host %s: CRL checking has been enabled, but "
|
||||
"neither %sCARevocationFile nor %sCARevocationPath "
|
||||
@@ -847,7 +841,7 @@ static apr_status_t ssl_init_ctx_crl(server_rec *s,
|
||||
return ssl_die(s);
|
||||
}
|
||||
|
||||
switch (mctx->crl_check_mode) {
|
||||
switch (crl_check_mode) {
|
||||
case SSL_CRLCHECK_LEAF:
|
||||
crlflags = X509_V_FLAG_CRL_CHECK;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user