]> granicus.if.org Git - apache/commitdiff
performance enhancement: mod_ssl config directives that can have both
authorDoug MacEachern <dougm@apache.org>
Tue, 26 Mar 2002 15:42:21 +0000 (15:42 +0000)
committerDoug MacEachern <dougm@apache.org>
Tue, 26 Mar 2002 15:42:21 +0000 (15:42 +0000)
a per-server and per-dir context were configuring the per-dir context
for per-server commands.  this triggered ssl_hook_Access to always
compare the per-server context against per-dir configs that were
exactly the same.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94176 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_config.c

index 86ac10b8e218f4025150903d0d12d551dcafb7f4..d7b3ac6092450a3b39bb9e692f36795f0a7a1146 100644 (file)
@@ -525,11 +525,11 @@ const char *ssl_cmd_SSLCipherSuite(cmd_parms *cmd, void *ctx,
     SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
     SSLDirConfigRec *dc = (SSLDirConfigRec *)ctx;
 
-    if (!(cmd->path || dc)) {
-        sc->szCipherSuite = arg;
+    if (cmd->path) {
+        dc->szCipherSuite = (char *)arg;
     }
     else {
-        dc->szCipherSuite = (char *)arg;
+        sc->szCipherSuite = arg;
     }
 
     return NULL;
@@ -676,11 +676,11 @@ const char *ssl_cmd_SSLCACertificatePath(cmd_parms *cmd, void *ctx,
     }
 
 #ifdef SSL_EXPERIMENTAL_PERDIRCA
-    if (!(cmd->path || dc)) {
-        sc->szCACertificatePath = arg;
+    if (cmd->path) {
+        dc->szCACertificatePath = arg;
     }
     else {
-        dc->szCACertificatePath = arg;
+        sc->szCACertificatePath = arg;
     }
 #else
     sc->szCACertificatePath = arg;
@@ -703,11 +703,11 @@ const char *ssl_cmd_SSLCACertificateFile(cmd_parms *cmd, void *ctx,
     }
 
 #ifdef SSL_EXPERIMENTAL_PERDIRCA
-    if (!(cmd->path || dc)) {
-        sc->szCACertificateFile = arg;
+    if (cmd->path) {
+        dc->szCACertificateFile = arg;
     }
     else {
-        dc->szCACertificateFile = arg;
+        sc->szCACertificateFile = arg;
     }
 #else
     sc->szCACertificateFile = arg;
@@ -783,11 +783,11 @@ const char *ssl_cmd_SSLVerifyClient(cmd_parms *cmd, void *ctx,
         return err;
     }
     
-    if (!(cmd->path || dc)) {
-        sc->nVerifyClient = id;
+    if (cmd->path) {
+        dc->nVerifyClient = id;
     }
     else {
-        dc->nVerifyClient = id;
+        sc->nVerifyClient = id;
     }
 
     return NULL;
@@ -818,11 +818,11 @@ const char *ssl_cmd_SSLVerifyDepth(cmd_parms *cmd, void *ctx,
         return err;
     }
 
-    if (!(cmd->path || dc)) {
-        sc->nVerifyDepth = depth;
+    if (cmd->path) {
+        dc->nVerifyDepth = depth;
     }
     else {
-        dc->nVerifyDepth = depth;
+        sc->nVerifyDepth = depth;
     }
 
     return NULL;