]> granicus.if.org Git - apache/commitdiff
* modules/ssl/ssl_engine_config.c (ssl_cmd_check_file):
authorJoe Orton <jorton@apache.org>
Thu, 13 Jun 2019 15:34:28 +0000 (15:34 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 13 Jun 2019 15:34:28 +0000 (15:34 +0000)
  If dumping the config, don't validate the paths.  Allows
  e.g. "httpd -L" to work w/ certs configured but not present,
  doesn't affect "httpd -t".

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

modules/ssl/ssl_engine_config.c

index 3ded454b4c1154e0354958194a75b2d6cd26974d..26f8723f071b721c04b9c1b75c20dd4448d428cf 100644 (file)
@@ -904,8 +904,14 @@ const char *ssl_cmd_SSLCipherSuite(cmd_parms *cmd,
 static const char *ssl_cmd_check_file(cmd_parms *parms,
                                       const char **file)
 {
-    const char *filepath = ap_server_root_relative(parms->pool, *file);
+    const char *filepath;
 
+    /* If only dumping the config, don't verify the paths */
+    if (ap_state_query(AP_SQ_RUN_MODE) == AP_SQ_RM_CONFIG_DUMP) {
+        return NULL;
+    }
+
+    filepath = ap_server_root_relative(parms->pool, *file);
     if (!filepath) {
         return apr_pstrcat(parms->pool, parms->cmd->name,
                            ": Invalid file path ", *file, NULL);