trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject git commit: Log missing SSL certificate file instead of crashing
Date Sun, 06 Jan 2013 23:30:39 GMT
Updated Branches:
  refs/heads/master 27c0f2248 -> 54e3640fe


Log missing SSL certificate file instead of crashing


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/54e3640f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/54e3640f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/54e3640f

Branch: refs/heads/master
Commit: 54e3640fede93bcd59c3fd6981c5659a403ad129
Parents: 27c0f22
Author: James Peach <jpeach@apache.org>
Authored: Sun Jan 6 15:30:00 2013 -0800
Committer: James Peach <jpeach@apache.org>
Committed: Sun Jan 6 15:30:00 2013 -0800

----------------------------------------------------------------------
 iocore/net/SSLUtils.cc |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/54e3640f/iocore/net/SSLUtils.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLUtils.cc b/iocore/net/SSLUtils.cc
index a838b48..e87cec7 100644
--- a/iocore/net/SSLUtils.cc
+++ b/iocore/net/SSLUtils.cc
@@ -449,6 +449,10 @@ struct ats_x509_certificate
   explicit ats_x509_certificate(X509 * x) : x509(x) {}
   ~ats_x509_certificate() { if (x509) X509_free(x509); }
 
+  operator bool() const {
+      return x509 != NULL;
+  }
+
   X509 * x509;
 
 private:
@@ -554,7 +558,7 @@ ssl_store_ssl_context(
   xptr<char>  certpath;
 
   ctx = ssl_context_enable_sni(SSLInitServerContext(params, cert, ca, key), lookup);
-  if (!cert) {
+  if (!ctx) {
     SSLError("failed to create new SSL server context");
     return;
   }


Mime
View raw message