Bug 37912

Summary: [PATCH] Have ssl_engine_pphrase.c report what vhost it's working on, so it's easier to track what's wrong
Product: Apache httpd-2 Reporter: Nick Burch <apache>
Component: mod_sslAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: FixedInTrunk
Priority: P2    
Version: 2.0.55   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Nick Burch 2005-12-14 19:46:58 UTC
ssl_engine_pphrase.c prints out helpful things like "Init: Pass phrase
incorrect" and "Loading certificate & private key of SSL-aware server", but
neglects to tell you what what vhost it's acting on when doing this.

This patch will make it a tiny bit chattier at debug, and have it tell you what
vhost it's working on for a few places it seems it would be useful.


--- ssl_engine_pphrase.c.sav    2005-12-09 17:29:33.000000000 +0000
+++ ssl_engine_pphrase.c        2005-12-14 16:56:45.233984907 +0000
@@ -173,13 +173,26 @@
+        cpVHostID = ssl_util_vhostid(p, pServ);

-        if (!sc->enabled)
+        if (!sc->enabled) {
+                       ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, pServ,
+                                       "SSL not enabled on vhost %s, skipping
SSL setup for it",
+                                       cpVHostID );
             continue;
+               }
 
-        cpVHostID = ssl_util_vhostid(p, pServ);
         ap_log_error(APLOG_MARK, APLOG_INFO, 0, pServ,
-                     "Loading certificate & private key of SSL-aware server");
+                     "Loading certificate & private key of SSL-aware server %s",
+                                        cpVHostID);
 
         /*
          * Read in server certificate(s): This is the easy part
@@ -236,6 +249,10 @@
             ucp = ssl_asn1_table_set(mc->tPublicCert, cp, length);
             (void)i2d_X509(pX509Cert, &ucp); /* 2nd arg increments */
 
+                       ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, pServ,
+                     "Loaded certificate from %s",
+                                        sc->server->pks->cert_files[0]);
+
             /*
              * Free the X509 structure
              */
@@ -427,7 +444,7 @@
                 }
                 else {
                     ap_log_error(APLOG_MARK, APLOG_ERR, 0,
-                                 pServ, "Init: Pass phrase incorrect");
+                                 pServ, "Init: Pass phrase incorrect for key of
%s", cpVHostID);
                     ssl_log_ssl_error(APLOG_MARK, APLOG_ERR, pServ);
 
                     if (writetty) {
Comment 1 Stefan Fritsch 2011-06-29 19:53:22 UTC
r1141223
Comment 2 Stefan Fritsch 2012-02-26 16:37:20 UTC
fixed in 2.4.1