You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2016/09/12 18:11:14 UTC

[trafficserver] 01/02: Tidy up some comments and whitespace.

This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit d9ea53a77468cbcdc366b82845ccef66e8967cfc
Author: James Peach <jp...@apache.org>
AuthorDate: Mon Sep 12 10:24:00 2016 -0700

    Tidy up some comments and whitespace.
---
 iocore/net/SSLUtils.cc | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index 3bc3d2a..efda793 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -2053,14 +2053,16 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l
 
   const matcher_tags sslCertTags = {NULL, NULL, NULL, NULL, NULL, NULL, false};
 
-  // load the global ticket key for later use
+  // Load the global ticket key for later use.
   REC_ReadConfigStringAlloc(ticket_key_filename, "proxy.config.ssl.server.ticket_key.filename");
+
   if (ticket_key_filename != NULL) {
     ats_scoped_str ticket_key_path(Layout::relative_to(params->serverCertPathOnly, ticket_key_filename));
-    global_default_keyblock = ssl_create_ticket_keyblock(ticket_key_path); // this function just returns a keyblock
+    global_default_keyblock = ssl_create_ticket_keyblock(ticket_key_path);
   } else {
-    global_default_keyblock = ssl_create_ticket_keyblock(NULL); // this function just returns a keyblock
+    global_default_keyblock = ssl_create_ticket_keyblock(NULL);
   }
+
   Note("loading SSL certificate configuration from %s", params->configFilePath);
 
   if (params->configFilePath) {
@@ -2072,16 +2074,17 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l
     return false;
   }
 
-  // elevate/allow file access to root read only files/certs
+  // Optionally elevate/allow file access to read root-only
+  // certificates. The destructor will drop privilege for us.
   uint32_t elevate_setting = 0;
   REC_ReadConfigInteger(elevate_setting, "proxy.config.ssl.cert.load_elevated");
-  ElevateAccess elevate_access(elevate_setting ? ElevateAccess::FILE_PRIVILEGE : 0); // destructor will demote for us
+  ElevateAccess elevate_access(elevate_setting ? ElevateAccess::FILE_PRIVILEGE : 0);
 
   line = tokLine(file_buf, &tok_state);
   while (line != NULL) {
     line_num++;
 
-    // skip all blank spaces at beginning of line
+    // Skip all blank spaces at beginning of line.
     while (*line && isspace(*line)) {
       line++;
     }
@@ -2116,6 +2119,7 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l
       return false;
     }
   }
+
   return true;
 }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.