]> granicus.if.org Git - apache/commitdiff
mod_ssl: Warn about deprecated SSLCertificateChainFile once at startup,
authorYann Ylavic <ylavic@apache.org>
Fri, 12 Jun 2015 09:07:34 +0000 (09:07 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 12 Jun 2015 09:07:34 +0000 (09:07 +0000)
on first usage only.

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

CHANGES
modules/ssl/ssl_engine_config.c

diff --git a/CHANGES b/CHANGES
index 2067dfa7d0fd42a0d5f866fae684fa8fb701564b..8c5f9d6360d892315c4a5c7f53aed393a004fb14 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_ssl: Warn about deprecated SSLCertificateChainFile once at startup,
+     on first usage only.  [Yann Ylavic]
+
   *) mod_substitute: Fix configuraton merge order.
      PR 57641 [<Marc.Stern approach.be>]
 
index f85a8a0fb9b9cee377ec40eedc79ff8e93716ccd..c4320c9c7aefe437a83ba84822bda0e090ba37ff 100644 (file)
@@ -839,13 +839,22 @@ const char *ssl_cmd_SSLCertificateChainFile(cmd_parms *cmd,
                                             const char *arg)
 {
     SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
+    void *once = NULL;
     const char *err;
 
-    ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_STARTUP, 0, NULL,
-                 APLOGNO(02559)
-                 "The SSLCertificateChainFile directive (%s:%d) is deprecated, "
-                 "SSLCertificateFile should be used instead",
-                 cmd->directive->filename, cmd->directive->line_num);
+    apr_pool_userdata_get(&once, "ssl_cmd_SSLCertificateChainFile",
+                          ap_pglobal);
+    if (!once) {
+        ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_STARTUP, 0, NULL,
+                     APLOGNO(02559)
+                     "The SSLCertificateChainFile directive (%s:%d) is "
+                     "deprecated, SSLCertificateFile should be used instead",
+                     cmd->directive->filename, cmd->directive->line_num);
+
+        apr_pool_userdata_set("ssl_cmd_SSLCertificateChainFile",
+                              apr_pstrdup(ap_pglobal, "1"), NULL,
+                              ap_pglobal);
+    }
 
     if ((err = ssl_cmd_check_file(cmd, &arg))) {
         return err;