mirror of
https://github.com/apache/httpd.git
synced 2025-08-15 23:27:39 +00:00
Merge r1587607, r1588868 from trunk:
mod_ssl: Add hooks to allow other modules to perform processing at several stages of initialization and connection handling. See mod_ssl_openssl.h. This is enough to allow implementation of Certificate Transparency outside of mod_ssl. Initialize post_handshake_rc for case where a failure has already occurred (doesn't change execution but avoids warning with some levels of gcc). Pointed out by: kbrand Submitted by: trawick Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1735886 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -27,8 +27,14 @@
|
||||
see Recursive.''
|
||||
-- Unknown */
|
||||
#include "ssl_private.h"
|
||||
#include "mod_ssl.h"
|
||||
#include "mod_ssl_openssl.h"
|
||||
#include "mpm_common.h"
|
||||
|
||||
APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ssl, SSL, int, init_server,
|
||||
(server_rec *s,apr_pool_t *p,int is_proxy,SSL_CTX *ctx),
|
||||
(s,p,is_proxy,ctx), OK, DECLINED)
|
||||
|
||||
/* _________________________________________________________________
|
||||
**
|
||||
** Module Initialization
|
||||
@ -321,6 +327,21 @@ apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
|
||||
return rv;
|
||||
}
|
||||
|
||||
for (s = base_server; s; s = s->next) {
|
||||
sc = mySrvConfig(s);
|
||||
|
||||
if (sc->enabled == SSL_ENABLED_TRUE || sc->enabled == SSL_ENABLED_OPTIONAL) {
|
||||
if ((rv = ssl_run_init_server(s, p, 0, sc->server->ssl_ctx)) != APR_SUCCESS) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
else if (sc->proxy_enabled == SSL_ENABLED_TRUE) {
|
||||
if ((rv = ssl_run_init_server(s, p, 1, sc->proxy->ssl_ctx)) != APR_SUCCESS) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Announce mod_ssl and SSL library in HTTP Server field
|
||||
* as ``mod_ssl/X.X.X OpenSSL/X.X.X''
|
||||
|
Reference in New Issue
Block a user