You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/07/28 19:16:25 UTC

[trafficserver] branch 8.0.x updated: Warns on empty ssl_server_name.yaml configuration file

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

zwoop pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/8.0.x by this push:
     new 5e7d790  Warns on empty ssl_server_name.yaml configuration file
5e7d790 is described below

commit 5e7d790a3abda60059794d0b8903b18ee204a27a
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Tue Jun 26 16:27:40 2018 -0700

    Warns on empty ssl_server_name.yaml configuration file
    
    (cherry picked from commit d59fafcbcae24ad7d6e5d033e78208531071a8a0)
---
 iocore/net/YamlSNIConfig.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/iocore/net/YamlSNIConfig.cc b/iocore/net/YamlSNIConfig.cc
index 5d20ccd..06f8c6f 100644
--- a/iocore/net/YamlSNIConfig.cc
+++ b/iocore/net/YamlSNIConfig.cc
@@ -36,6 +36,11 @@ YamlSNIConfig::loader(const char *cfgFilename)
 {
   try {
     YAML::Node config = YAML::LoadFile(cfgFilename);
+    if (config.IsNull()) {
+      Warning("%s is empty", cfgFilename);
+      return ts::Errata();
+    }
+
     if (!config.IsSequence()) {
       return ts::Errata::Message(1, 1, "expected sequence");
     }