From c8cfc6f97073cde36946a175fa92fb8c99ac9b67 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 29 Mar 2002 02:43:33 +0000 Subject: [PATCH] enable proxy directives git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94286 13f79535-47bb-0310-9956-ffa450edef68 --- modules/ssl/mod_ssl.c | 2 -- modules/ssl/mod_ssl.h | 19 ++++++----- modules/ssl/ssl_engine_config.c | 56 +++++++++++++++++---------------- 3 files changed, 38 insertions(+), 39 deletions(-) diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index 314a426e03..9c5af5cd63 100644 --- a/modules/ssl/mod_ssl.c +++ b/modules/ssl/mod_ssl.c @@ -151,7 +151,6 @@ static const command_rec ssl_config_cmds[] = { "Enable or disable various SSL protocols" "(`[+-][SSLv2|SSLv3|TLSv1] ...' - see manual)") -#ifdef SSL_EXPERIMENTAL_PROXY /* * Proxy configuration for remote SSL connections */ @@ -179,7 +178,6 @@ static const command_rec ssl_config_cmds[] = { SSL_CMD_SRV(ProxyMachineCertificatePath, TAKE1, "SSL Proxy: directory containing client certificates " "(`/path/to/dir' - contains PEM encoded certificates)") -#endif /* * Per-directory context configuration directives diff --git a/modules/ssl/mod_ssl.h b/modules/ssl/mod_ssl.h index 7c8358fb27..a5182d70b3 100644 --- a/modules/ssl/mod_ssl.h +++ b/modules/ssl/mod_ssl.h @@ -587,16 +587,15 @@ const char *ssl_cmd_SSLProtocol(cmd_parms *, void *, const char *); const char *ssl_cmd_SSLOptions(cmd_parms *, void *, const char *); const char *ssl_cmd_SSLRequireSSL(cmd_parms *, void *); const char *ssl_cmd_SSLRequire(cmd_parms *, void *, const char *); -#ifdef SSL_EXPERIMENTAL_PROXY -const char *ssl_cmd_SSLProxyProtocol(cmd_parms *, char *, const char *); -const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *, char *, char *); -const char *ssl_cmd_SSLProxyVerify(cmd_parms *, char *, int); -const char *ssl_cmd_SSLProxyVerifyDepth(cmd_parms *, char *, char *); -const char *ssl_cmd_SSLProxyCACertificatePath(cmd_parms *, char *, char *); -const char *ssl_cmd_SSLProxyCACertificateFile(cmd_parms *, char *, char *); -const char *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *, char *, char *); -const char *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *, char *, char *); -#endif + +const char *ssl_cmd_SSLProxyProtocol(cmd_parms *, void *, const char *); +const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *, void *, const char *); +const char *ssl_cmd_SSLProxyVerify(cmd_parms *, void *, int); +const char *ssl_cmd_SSLProxyVerifyDepth(cmd_parms *, void *, const char *); +const char *ssl_cmd_SSLProxyCACertificatePath(cmd_parms *, void *, const char *); +const char *ssl_cmd_SSLProxyCACertificateFile(cmd_parms *, void *, const char *); +const char *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *, void *, const char *); +const char *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *, void *, const char *); /* module initialization */ int ssl_init_Module(apr_pool_t *, apr_pool_t *, apr_pool_t *, server_rec *); diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c index 0194e508e0..699eed158a 100644 --- a/modules/ssl/ssl_engine_config.c +++ b/modules/ssl/ssl_engine_config.c @@ -1228,7 +1228,8 @@ static const char *ssl_cmd_protocol_parse(cmd_parms *parms, return NULL; } -const char *ssl_cmd_SSLProtocol(cmd_parms *cmd, void *ctx, +const char *ssl_cmd_SSLProtocol(cmd_parms *cmd, + void *dcfg, const char *opt) { SSLSrvConfigRec *sc = mySrvConfig(cmd->server); @@ -1236,38 +1237,40 @@ const char *ssl_cmd_SSLProtocol(cmd_parms *cmd, void *ctx, return ssl_cmd_protocol_parse(cmd, opt, &sc->server->protocol); } -#ifdef SSL_EXPERIMENTAL_PROXY - -const char *ssl_cmd_SSLProxyProtocol(cmd_parms *cmd, char *struct_ptr, - const char *opt) +const char *ssl_cmd_SSLProxyProtocol(cmd_parms *cmd, + void *dcfg, + const char *arg) { SSLSrvConfigRec *sc = mySrvConfig(cmd->server); - return ssl_cmd_protocol_parse(cmd, opt, &sc->nProxyProtocol); + return ssl_cmd_protocol_parse(cmd, arg, &sc->proxy->protocol); } -const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *cmd, char *struct_ptr, - char *arg) +const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *cmd, + void *dcfg, + const char *arg) { SSLSrvConfigRec *sc = mySrvConfig(cmd->server); - sc->szProxyCipherSuite = arg; + sc->proxy->auth.cipher_suite = arg; return NULL; } -const char *ssl_cmd_SSLProxyVerify(cmd_parms *cmd, char *struct_ptr, +const char *ssl_cmd_SSLProxyVerify(cmd_parms *cmd, + void *dcfg, int flag) { SSLSrvConfigRec *sc = mySrvConfig(cmd->server); - sc->bProxyVerify = flag ? TRUE : FALSE; + sc->proxy->auth.verify_mode = flag ? TRUE : FALSE; return NULL; } -const char *ssl_cmd_SSLProxyVerifyDepth(cmd_parms *cmd, char *struct_ptr, - char *arg) +const char *ssl_cmd_SSLProxyVerifyDepth(cmd_parms *cmd, + void *dcfg, + const char *arg) { SSLSrvConfigRec *sc = mySrvConfig(cmd->server); int depth; @@ -1277,14 +1280,14 @@ const char *ssl_cmd_SSLProxyVerifyDepth(cmd_parms *cmd, char *struct_ptr, return err; } - sc->nProxyVerifyDepth = depth; + sc->proxy->auth.verify_depth = depth; return NULL; } const char *ssl_cmd_SSLProxyCACertificateFile(cmd_parms *cmd, - char *struct_ptr, - char *arg) + void *dcfg, + const char *arg) { SSLSrvConfigRec *sc = mySrvConfig(cmd->server); const char *err; @@ -1293,14 +1296,14 @@ const char *ssl_cmd_SSLProxyCACertificateFile(cmd_parms *cmd, return err; } - sc->szProxyCACertificateFile = arg; + sc->proxy->auth.ca_cert_file = arg; return NULL; } const char *ssl_cmd_SSLProxyCACertificatePath(cmd_parms *cmd, - char *struct_ptr, - char *arg) + void *dcfg, + const char *arg) { SSLSrvConfigRec *sc = mySrvConfig(cmd->server); const char *err; @@ -1309,14 +1312,14 @@ const char *ssl_cmd_SSLProxyCACertificatePath(cmd_parms *cmd, return err; } - sc->szProxyCACertificatePath = arg; + sc->proxy->auth.ca_cert_path = arg; return NULL; } const char *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *cmd, - char *struct_ptr, - char *arg) + void *dcfg, + const char *arg) { SSLSrvConfigRec *sc = mySrvConfig(cmd->server); const char *err; @@ -1325,14 +1328,14 @@ const char *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *cmd, return err; } - sc->szProxyClientCertificateFile = arg; + sc->proxy->pkp->cert_file = arg; return NULL; } const char *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *cmd, - char *struct_ptr, - char *arg) + void *dcfg, + const char *arg) { SSLSrvConfigRec *sc = mySrvConfig(cmd->server); const char *err; @@ -1341,10 +1344,9 @@ const char *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *cmd, return err; } - sc->szProxyClientCertificatePath = arg; + sc->proxy->pkp->cert_file = arg; return NULL; } -#endif /* SSL_EXPERIMENTAL_PROXY */ -- 2.40.0